Repository navigation
Fix sync-rush-versions workflow permissions for Dependabot PRs - #204
Merged
Merged
Conversation
…r Dependabot PRs Co-authored-by: nev21 <82737406+nev21@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update sync rush versions workflow for Dependabot PRs
Fix sync-rush-versions workflow permissions for Dependabot PRs
Dec 31, 2025
nev21
approved these changes
Dec 31, 2025
nev21
marked this pull request as ready for review
December 31, 2025 07:54
nev21
enabled auto-merge (squash)
December 31, 2025 07:54
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the sync-rush-versions.yml workflow to fix permission issues preventing it from running on Dependabot pull requests. The workflow needs write permissions to push commits that sync rush.json and regenerate lockfiles.
Key Changes:
- Changed trigger from
pull_requesttopull_request_targetto grant write permissions - Updated checkout steps to explicitly reference the PR head branch using
github.event.pull_request.head.refandgithub.event.pull_request.head.repo.full_name
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.
The
sync-rush-versions.ymlworkflow fails on Dependabot PRs due to read-onlyGITHUB_TOKENpermissions with thepull_requesttrigger, preventing it from pushing commits to sync rush.json and regenerate lockfiles.Changes
pull_requesttopull_request_targetto grant write permissionsSecurity
Safe use of
pull_request_targetas the workflow:github.actor == 'dependabot[bot]'Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.