Skip to content

Skip workflows for bot-created PRs#680

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/skip-prs-from-bots
Draft

Skip workflows for bot-created PRs#680
Copilot wants to merge 6 commits intomainfrom
copilot/skip-prs-from-bots

Conversation

Copy link

Copilot AI commented Feb 2, 2026

Updates GitHub Actions workflows to skip execution for bot-created PRs to avoid unnecessary workflow runs.

Changes

generate_library.yml

  • Extended skip condition: Added dependabot check with label filter to existing pyansys-ci-bot condition
  • Safety: Guard github.event.pull_request access with github.event_name == 'pull_request' check to handle workflow_dispatch events
  • Readability: Reformatted multi-condition expression across lines with explanatory comment
# Skip if PR is triggered by pyansys-ci-bot or if PR is created by dependabot with 'uv' label
if: |
  ${{
    !(github.actor == 'pyansys-ci-bot' && github.event.action == 'synchronize') &&
    !(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'uv'))
  }}

label.yml

  • Skip for dependabot: Added skip conditions to both labeler and commenter jobs for dependabot PRs
  • Explanation: Added comments noting that dependabot handles its own labelling
  • The label-syncer job remains unaffected as it runs on push to main branch
# Skip for dependabot PRs as dependabot handles its own labelling
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]'

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 2, 2026 14:21
Co-authored-by: da1910 <12086549+da1910@users.noreply.github.com>
Co-authored-by: da1910 <12086549+da1910@users.noreply.github.com>
Co-authored-by: da1910 <12086549+da1910@users.noreply.github.com>
Copilot AI changed the title [WIP] Update generate_library.yml to skip certain PRs Skip generate_library workflow for dependabot PRs with 'uv' label Feb 2, 2026
Copilot AI requested a review from da1910 February 2, 2026 14:25
@github-actions github-actions bot added the maintenance Package and maintenance related label Feb 2, 2026
@da1910
Copy link
Collaborator

da1910 commented Feb 2, 2026

@copilot Please also skip the entirety of the label.yml workflow when the PR is created by dependabot. Add a label to explain that dependabot handles its own labelling.

Co-authored-by: da1910 <12086549+da1910@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 2, 2026

@copilot Please also skip the entirety of the label.yml workflow when the PR is created by dependabot. Add a label to explain that dependabot handles its own labelling.

Done in commit 2d756b3. The label.yml workflow now skips both the labeler and commenter jobs for dependabot PRs, with comments explaining that dependabot handles its own labelling.

Copilot AI changed the title Skip generate_library workflow for dependabot PRs with 'uv' label Skip workflows for bot-created PRs Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Package and maintenance related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants