Repository navigation
Document the workflow scope WINGET_PR_TOKEN needs - #7
Conversation
wingetcreate fast-forwards the token owner's fork of microsoft/winget-pkgs before it branches. GitHub refuses that sync for a classic PAT without the workflow scope once an upstream commit changes a file under .github/workflows, which broke sigit v1.7.10. Both the submit and update paths sync the fork, so this workflow hits it the next time winget-pkgs edits a workflow file. Add workflow to the scope comment and to both "WINGET_PR_TOKEN is not set" error messages. No logic changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Docs-only change to .github/workflows/release-winget.yml: the WINGET_PR_TOKEN scope comment gains a note that workflow is needed because wingetcreate fast-forwards the token owner's winget-pkgs fork and GitHub rejects that sync for a classic PAT without workflow once an upstream commit touches .github/workflows (the sigit v1.7.10 failure), and both "WINGET_PR_TOKEN is not set" error messages now list workflow alongside public_repo, read:org, and read:discussion. The claim checks out: pushing commits that modify workflow files to a fork requires the workflow scope on a classic PAT, and both the submit and update paths sync the fork, so both messages are correctly updated. No logic changes; nothing to flag.
Automated review by siGit Code Review · commit 1f3ec90 · see the review dashboard
Record which scopes WINGET_ISSUE_TOKEN and WINGET_PR_TOKEN need and why workflow is one of them, plus what the fork sync error means and how to get past it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Docs-only follow-up: adds two lines to .agents/AGENTS.md documenting that WINGET_PR_TOKEN needs the workflow scope, explaining why (wingetcreate fast-forwards the token owner's winget-pkgs fork, which GitHub rejects for a classic PAT without workflow once upstream touches .github/workflows), and giving the failure signature plus the manual-sync fallback. The workflow-scope requirement itself checks out against public reports of the same failure mode. One wording issue: the doc pins the generic sync error to a single cause.
Automated review by siGit Code Review · commit 77051ca · changes since 1f3ec90 · see the review dashboard
The sync failure is generic and also fires when the fork has drifted behind upstream, so it cannot be pinned on a missing workflow scope alone. Match the sentence to the fork-sync remedy it already offers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.6 <noreply@sigit.si>
There was a problem hiding this comment.
Documentation-only change to .agents/AGENTS.md that clarifies the WINGET_PR_TOKEN scope story for the winget release workflow. The earlier nit about the error message overstating the cause was addressed in addcc34: the text now says the sync error "can mean the PAT lacks workflow, or that the fork has simply drifted too far behind upstream", which matches the generic winget-create failure and the manual-sync remedy already in the sentence. No logic changes, and nothing else in the diff needs attention.
Automated review by siGit Code Review · commit addcc34 · changes since 77051ca · see the review dashboard
wingetcreate fast-forwards the token owner's fork of microsoft/winget-pkgs before it branches. GitHub refuses that sync for a classic PAT without the
workflowscope once an upstream commit changes a file under.github/workflows. That is what broke the sigit v1.7.10 winget run. The submit and update paths both sync the fork, so this workflow hits it the next time winget-pkgs edits a workflow file.This adds
workflowto the scope comment and to both "WINGET_PR_TOKEN is not set" error messages. No logic changes.Before the next release, add the
workflowscope to theWINGET_PR_TOKENPAT (the value stays the same, so the secret needs no update). If the run still fails with "The forked repository could not be synced with the upstream commits", sync the token owner's winget-pkgs fork by hand and rerun.