Skip to content

Use WORKFLOW_PAT where appropriate to ensure auto-merge can be applied#353

Merged
knoepfel merged 1 commit intoFramework-R-D:mainfrom
greenc-FNAL:bugfix/dependabot-auto-merge
Feb 26, 2026
Merged

Use WORKFLOW_PAT where appropriate to ensure auto-merge can be applied#353
knoepfel merged 1 commit intoFramework-R-D:mainfrom
greenc-FNAL:bugfix/dependabot-auto-merge

Conversation

@greenc-FNAL
Copy link
Contributor

No description provided.

Copy link
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

This PR switches the Dependabot auto-merge workflow to use WORKFLOW_PAT instead of GITHUB_TOKEN to resolve permission issues when enabling auto-merge on protected branches. The change eliminates the need for extensive error handling around the "not authorized for this protected branch" error that occurred when using GITHUB_TOKEN with pull_request_target.

Changes:

  • Replaced secrets.GITHUB_TOKEN with secrets.WORKFLOW_PAT for the auto-merge operation
  • Removed error handling and documentation comments related to GITHUB_TOKEN permission restrictions
  • Simplified error message pattern matching to exclude the "not authorized" case

@greenc-FNAL greenc-FNAL force-pushed the bugfix/dependabot-auto-merge branch from 16d3d07 to 75a4b02 Compare February 24, 2026 16:31
@knoepfel knoepfel merged commit fa4fb82 into Framework-R-D:main Feb 26, 2026
50 checks passed
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.

4 participants