ci: sync winget-pkgs fork before submitting manifest - #596
Open
Gordon Lam (yeelam-gordon) wants to merge 1 commit into
Open
ci: sync winget-pkgs fork before submitting manifest#596Gordon Lam (yeelam-gordon) wants to merge 1 commit into
Gordon Lam (yeelam-gordon) wants to merge 1 commit into
Conversation
The Publish to WinGet workflow failed for v0.2 with 'The forked repository could not be synced with the upstream commits.' wingetcreate can only fast-forward a fork that is not too far behind; between releases the fork had fallen ~11,900 commits behind microsoft/winget-pkgs. Add a best-effort pre-sync step that fast-forwards the token owner's fork via the merge-upstream API before wingetcreate runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 27d9112c-7ed9-41c4-9dda-5dbef425d66c
Copilot started reviewing on behalf of
Gordon Lam (yeelam-gordon)
August 11, 2026 05:59
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the Publish to WinGet GitHub Actions workflow by adding a best-effort pre-sync of the winget-pkgs fork before invoking wingetcreate, preventing releases from failing when the fork has drifted far behind upstream.
Changes:
- Add a
continue-on-errorstep that resolves the token owner (gh api user) and fast-forwards theirwinget-pkgsfork viamerge-upstreambefore manifest submission.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Publish to WinGetworkflow failed for the v0.2 release (run 31422164208):The manifest itself was fine — the failure was entirely in
wingetcreate's submit step.wingetcreatecan only fast-forward the token owner'swinget-pkgsfork when it is reasonably current. Between releases the fork drifted to 11,902 commits behind / 0 ahead ofmicrosoft/winget-pkgs, and the fast-forward attempt failed.Immediate remediation (already done)
The fork was synced via the
merge-upstreamAPI and the job re-run, which succeeded and produced microsoft/winget-pkgs#415289 for0.2.2192.0.This change
Adds a best-effort pre-sync step that fast-forwards the token owner's fork before
wingetcreateruns, so the same drift can't break a future release.continue-on-error: true—wingetcreatestill attempts its own sync, so a transient API error must not fail the release.gh api user) rather than hard-coded.merge-upstreamis non-destructive: it only fast-forwards, and returns 409 (ignored) if it cannot.