Accept a bare pull_request: in the nf-test workflow trigger - #4441
Open
FelixKrueger wants to merge 1 commit into
Open
Accept a bare pull_request: in the nf-test workflow trigger#4441FelixKrueger wants to merge 1 commit into
pull_request: in the nf-test workflow trigger#4441FelixKrueger wants to merge 1 commit into
Conversation
The rule documents the expected trigger as
on:
pull_request:
release:
types: [published]
then fails when that subtree parses to None, which is exactly what a bare key
gives -- so the documented form is rejected. Test for the key instead of its
value, which is what test_actions_nf_test_fail_wrong_trigger already assumes:
it pops the key entirely to provoke the failure.
Pipelines hit this when removing paths-ignore so that a required confirm-pass
check can report on docs-only PRs.
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
actions_nf_testdocuments the expected trigger as a barepull_request:, then fails when that subtree parses toNone— which is exactly what a bare key gives, so the documented form is rejected. This tests for the key instead of its value, which is whattest_actions_nf_test_fail_wrong_triggeralready assumes: it pops the key entirely to provoke the failure. A test for the bare form comes with it.I ran into this removing
paths-ignorefrom a pipeline'snf-test.ymlso that a requiredconfirm-passcheck could report on docs-only PRs — without that filter the workflow is skipped, the check never reports, and the PR is permanently blocked. Happy to add a CHANGELOG entry;devhas no unreleased section open yet so I left it alone.Behaviour across the four trigger shapes (AI-assisted)
on:shapepaths-ignorepresentpull_request:types: [opened, …]pull_requestkey absent (existing failure test)So one case changes and the two existing tests are unaffected.