Skip to content

Improve workflow dispatch for Dependabot PRs - #4137

Open
mbg wants to merge 5 commits into
mainfrom
mbg/skip-fewer-dependabot-workflows
Open

mbg wants to merge 5 commits into
mainfrom
mbg/skip-fewer-dependabot-workflows

Conversation

@mbg

@mbg mbg commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

This is an experiment to improve workflow runs for Dependabot PRs in cases where the Rebuild workflow doesn't make any changes. The central idea is that the Rebuild workflow applies a label (Rebuild: Unchanged) to a PR it ran for, but where it made no changes. The label is then used as a trigger for the required workflows.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).
  • Other - Please provide details.

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • Other - Please provide details.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@mbg mbg self-assigned this Sep 10, 2026
@github-actions github-actions Bot added the size/XS Should be very easy to review label Sep 10, 2026
@mbg
mbg marked this pull request as ready for review October 21, 2026 18:39
Copilot AI max review requested due to automatic review settings October 21, 2026 18:40
@mbg
mbg requested a review from a team as a code owner October 21, 2026 18:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The configured token cannot trigger the intended checks, and unrelated label events can cancel active validation.

4 open issues
57 files not reviewed

And 37 more.

What changed in this PR

This experiment aims to run CodeQL Action’s generated PR checks for Dependabot updates when rebuilding produces no changes.

Changes:

  • Adds label-event triggers and shared job conditions to generated workflows.
  • Applies Rebuild: Unchanged after a rebuild reports no changes.
File Description
pr-checks/​sync.ts Generates label-triggered checks and job conditions.
.github/​workflows/​rebuild.yml Adds the unchanged-rebuild label.

Review effort: Max

github.event_name == 'pull_request' &&
steps.push.outputs.changes != 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
"Please approve running the PR checks." |
gh pr comment --body-file - --repo github/codeql-action "$PR_NUMBER"

- name: "Add 'Rebuild: Unchanged' label"
- name: "Add 'Rebuild: Unchanged' label"
if: >-
github.event_name == 'pull_request' &&
steps.push.outputs.changes != 'true'
Comment thread pr-checks/sync.ts
},
pull_request: {},
pull_request: {
types: ["opened", "synchronize", "reopened", "labeled"],

This branch has not been deployed

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

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants