fix(checks): Amend job execution conditions#122
Merged
chris3ware merged 2 commits intomainfrom Feb 11, 2025
Merged
Conversation
The whole job should be skipped if the condition is not met.
Enforce all checks needs to be in the same context as the other checks
Member
Author
|
The auto-approve-pr job has been skipped correctly. |
chazypro
approved these changes
Feb 11, 2025
3ware-release Bot
pushed a commit
that referenced
this pull request
Feb 11, 2025
## [4.5.1](v4.5.0...v4.5.1) (2025-02-11) ### Bug Fixes * **checks:** Amend job execution conditions ([#122](#122)) ([84c17f9](84c17f9))
Contributor
|
This PR is included in version 4.5.1 |
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.
Tests run in #121 highlighted two problems:
The condition for the execution of the approval job should be set at the job level so the job is skipped if the conditions are not met. This was incorrectly set at the step level. This is confusing because it looks like the job has run in the pull request, when in fact the only step in the job has been (correctly) skipped.
When
enforce-all-checksis triggered via thepull_request_targetevent it is not in the same context as the other checks. As a result it had completed before the other checks had - which defeats the point of this check. To overcome this, thepull_requesttrigger has been reintroduced with a conditional execution statement to runenforce-all-checksonpull_requestevents.