Skip to content

fix: use PR_TOKEN for tag-scan workflow#69

Merged
EmersonFras merged 4 commits intomainfrom
fix/tag-scan-pr-token
Mar 30, 2026
Merged

fix: use PR_TOKEN for tag-scan workflow#69
EmersonFras merged 4 commits intomainfrom
fix/tag-scan-pr-token

Conversation

@EmersonFras
Copy link
Copy Markdown
Contributor

Summary

The weekly tag scan workflow was failing to open PRs due to org-level restrictions on GITHUB_TOKEN that prevent it from creating pull requests. Replaced GITHUB_TOKEN with a fine-grained PAT (PR_TOKEN) for the checkout and gh CLI steps, which covers both the git push and gh pr create calls.

Testing

Verified working by running workflow on this branch

Copilot AI review requested due to automatic review settings March 30, 2026 17:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the weekly tag scan GitHub Actions workflow to use a fine-grained PAT (PR_TOKEN) for operations that need to push branches and open/edit PRs, addressing org-level restrictions that prevent GITHUB_TOKEN from creating pull requests.

Changes:

  • Switch actions/checkout authentication from secrets.GITHUB_TOKEN to secrets.PR_TOKEN.
  • Switch gh CLI authentication from secrets.GITHUB_TOKEN to secrets.PR_TOKEN for PR creation/editing.
  • Preserve working-tree changes when checking out an existing tag-scan/auto branch via git stash/git stash pop.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@egrace479 egrace479 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One note/question on the secret change for the checkout step

Copy link
Copy Markdown
Member

@egrace479 egrace479 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@EmersonFras EmersonFras merged commit 144d229 into main Mar 30, 2026
6 checks passed
@EmersonFras EmersonFras deleted the fix/tag-scan-pr-token branch March 30, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants