Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(api): add manual sync endpoint for on-demand refresh#1319

Merged
jonnii merged 1 commit into
main from
jonnii/20260623030002/add-manual-sync-endpoint-for-on-demand-refresh
Jun 24, 2026
Merged

feat(api): add manual sync endpoint for on-demand refresh #1319
jonnii merged 1 commit into
main from
jonnii/20260623030002/add-manual-sync-endpoint-for-on-demand-refresh

Conversation

@jonnii

@jonnii jonnii commented Jun 23, 2026
edited
Loading

Copy link
Copy Markdown
Collaborator

🔒 This PR has been locked (consolidating). To unlock it, run st unlock.

POST /api/v1/repos/{repoID}/sync forces an immediate refresh of one repo. It is
the manual complement to the webhook and interval refreshes, and the primary way
to pull remote changes on a local server that GitHub cannot reach with a webhook
(webhooks are server-mode only; locally the fsnotify watcher covers local edits
and this covers on-demand remote pulls).

The refresh path is safety-aware:

  • Managed mirror: synchronous mirror-fetch + rebuild (detached HEAD, safe).
  • Local -cwd working repo: re-read on-disk refs only, never mirror-fetch — that
    would detach the operator working tree HEAD (safety-invariants.md).

The route is session-gated like submit and refused on a public read-only server,
so it is never an anonymous fetch trigger; on a local auth-disabled server it
stays reachable.


Stack

💡 Notice: This PR is part of a stack merge into branch stack-merge-stack-1782266218.

Auto-generated by Stackit


Merged via consolidation into #1326 by jonnii

POST /api/v1/repos/{repoID}/sync forces an immediate refresh of one repo. It is
the manual complement to the webhook and interval refreshes, and the primary way
to pull remote changes on a local server that GitHub cannot reach with a webhook
(webhooks are server-mode only; locally the fsnotify watcher covers local edits
and this covers on-demand remote pulls).
The refresh path is safety-aware:
- Managed mirror: synchronous mirror-fetch + rebuild (detached HEAD, safe).
- Local -cwd working repo: re-read on-disk refs only, never mirror-fetch — that
 would detach the operator working tree HEAD (safety-invariants.md).
The route is session-gated like submit and refused on a public read-only server,
so it is never an anonymous fetch trigger; on a local auth-disabled server it
stays reachable.
This was referenced Jun 23, 2026
Base automatically changed from jonnii/20260623025733/coalesce-webhook-driven-syncs-per-repo to main June 24, 2026 02:00
@jonnii jonnii merged commit 116cfbb into main Jun 24, 2026
7 of 12 checks passed
@jonnii jonnii deleted the jonnii/20260623030002/add-manual-sync-endpoint-for-on-demand-refresh branch June 24, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /