-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workflows/eval: run when base branch changed #372475
Draft
wolfgangwalther
wants to merge
2
commits into
NixOS:master
Choose a base branch
from
wolfgangwalther:ci-pull-request-target-edited
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Instead of adding all the jobs to run on a changed base to "edited.yml", we use this intermediate layer. | ||
# This will make it, that in the case of editing the title or description, there will only be a single skipped job | ||
# appearing in the checks list, instead of all the jobs below cluttering the output. | ||
wolfgangwalther marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
name: "Edited Base" | ||
|
||
on: | ||
workflow_call: | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
check-nix-format: | ||
name: Check that Nix files are formatted | ||
uses: ./.github/workflows/check-nix-format.yml | ||
|
||
check-nixf-tidy: | ||
name: Check changed Nix files with nixf-tidy (experimental) | ||
uses: ./.github/workflows/check-nixf-tidy.yml | ||
|
||
codeowners-v2: | ||
name: Codeowners v2 | ||
uses: ./.github/workflows/codeowners-v2.yml | ||
|
||
eval: | ||
name: Eval | ||
uses: ./.github/workflows/eval.yml | ||
permissions: | ||
pull-requests: write | ||
statuses: write | ||
wolfgangwalther marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
labels: | ||
name: Label PR | ||
uses: ./.github/workflows/labels.yml | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
nixpkgs-vet: | ||
name: Vet nixpkgs | ||
uses: ./.github/workflows/nixpkgs-vet.yml | ||
|
||
no-channel: | ||
name: No channel PR | ||
if: startsWith(github.event.pull_request.base.ref, 'nixos-') || startsWith(github.event.pull_request.base.ref, 'nixpkgs-') | ||
uses: ./.github/workflows/no-channel.yml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Some workflows depend 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. | ||
# Since `edited` is also triggered when PR title/body is changed, we use this wrapper workflow, to run the other workflows conditionally only. | ||
# There are already feature requests for adding a `base_changed` event: | ||
# - https://github.com/orgs/community/discussions/35058 | ||
# - https://github.com/orgs/community/discussions/64119 | ||
# | ||
# Instead of adding this to each workflow's pull_request_target event, we trigger this in a separate workflow. | ||
# This has the advantage, that we can actually skip running those jobs for simple edits like changing the title or description. | ||
|
||
name: "Edited" | ||
|
||
on: | ||
pull_request_target: | ||
types: [edited] | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
base: | ||
name: Base | ||
if: github.event.changes.base.ref.from && github.event.changes.base.ref.from != github.event.pull_request.base.ref | ||
uses: ./.github/workflows/edited-base.yml | ||
# Currently needed downstream for eval.yml and labels.yml | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
statuses: write |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines should have some generic comment indicating that it's used via
edited-base.yml