Skip to content

fix(checks): Amend job execution conditions#122

Merged
chris3ware merged 2 commits intomainfrom
fix-checks
Feb 11, 2025
Merged

fix(checks): Amend job execution conditions#122
chris3ware merged 2 commits intomainfrom
fix-checks

Conversation

@chris3ware
Copy link
Copy Markdown
Member

@chris3ware chris3ware commented Feb 11, 2025

Tests run in #121 highlighted two problems:

  1. 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.

  2. When enforce-all-checks is triggered via the pull_request_target event 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, the pull_request trigger has been reintroduced with a conditional execution statement to run enforce-all-checks on pull_request events.

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
@chris3ware
Copy link
Copy Markdown
Member Author

The auto-approve-pr job has been skipped correctly.

@chris3ware chris3ware marked this pull request as ready for review February 11, 2025 19:51
@chris3ware chris3ware requested a review from a team as a code owner February 11, 2025 19:51
@chris3ware chris3ware merged commit 84c17f9 into main Feb 11, 2025
@chris3ware chris3ware deleted the fix-checks branch February 11, 2025 21:22
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))
@3ware-release
Copy link
Copy Markdown
Contributor

3ware-release Bot commented Feb 11, 2025

This PR is included in version 4.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants