Skip to content

Use app token for codeowner merges - #2553

Open
Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:fix-codeowners-merge-workflow-permission
Open

Use app token for codeowner merges#2553
Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:fix-codeowners-merge-workflow-permission

Conversation

@jakebailey

Copy link
Copy Markdown
Member

See https://github.com/orgs/community/discussions/194847#discussioncomment-16817164

If a codeowners mergable PR predates a workflow file change, then the GHA token can't merge it, apparently.

Switch to using the tsbot app for this.

Use the automation app token only for codeowner merge comments so stale
pull requests can update workflow files without minting tokens for every
event.
on:
pull_request_target: { types: [opened] }
issue_comment: { types: [created] }
pull_request_review: { types: [submitted] }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The azure env is not allowed to be triggered from this as the target ref is the PR and not main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants