fix: skip sync jobs on dependabot branches even when actor is not dependabot#467
Merged
fix: skip sync jobs on dependabot branches even when actor is not dependabot#467
Conversation
…endabot Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com> Agent-Logs-Url: https://github.com/rajbos/github-copilot-token-usage/sessions/7941a3f9-808d-4272-ba3b-3f91ecc965fa
Copilot created this pull request from a session on behalf of
rajbos
March 22, 2026 14:47
View session
rajbos
approved these changes
Mar 22, 2026
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.
Problem
The Sync Copilot Models / sync-models and Sync Tool Names from vscode-copilot-chat / sync-toolnames jobs fail on dependabot PR branches when main is merged into them.
The existing
if: github.actor != 'dependabot[bot]'condition only catches direct dependabot pushes. When a repo owner merges main into a dependabot branch, the actor becomes the owner (rajbos) — yetsecrets.GH_PATis still unavailable on dependabot branches, causing the "Authenticate GitHub CLI" step to fail.Example failing runs:
rajbos, branch:dependabot/npm_and_yarn/eslint-10.1.0rajbos, branch:dependabot/npm_and_yarn/eslint-10.1.0Fix
Added
!startsWith(github.ref_name, 'dependabot/')to the jobifconditions in both workflows, so the sync jobs are skipped on any push to adependabot/*branch, regardless of the triggering actor.Before
After