Skip to content

Commit

Permalink
Merge pull request #282707 from tweag/by-name-base-trigger
Browse files Browse the repository at this point in the history
workflows/check-by-name: Trigger on base branch changes
  • Loading branch information
infinisil authored Jan 24, 2024
2 parents 17696cd + 0825957 commit 2ced5ae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/check-by-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ name: Check pkgs/by-name
# see pkgs/test/nixpkgs-check-by-name/scripts/README.md
on:
# Using pull_request_target instead of pull_request avoids having to approve first time contributors
pull_request_target
pull_request_target:
# This workflow depends on the base branch of the PR,
# but changing the base branch is not included in the default trigger events,
# which would be `opened`, `synchronize` or `reopened`.
# Instead it causes an `edited` event, so we need to add it explicitly here
# While `edited` is also triggered when the PR title/body is changed,
# this PR action is fairly quick, and PR's don't get edited that often,
# so it shouldn't be a problem
types: [opened, synchronize, reopened, edited]

permissions:
# We need this permission to cancel the workflow run if there's a merge conflict
Expand Down

0 comments on commit 2ced5ae

Please sign in to comment.