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.
Checklist
README.md
is updated with the changes (if needed)Version
Requires a PATCH version update
Context
This PR fixes an issue with the previously introduced draft PR trigger control.
The previous implementation couldn't handle properly when a draft PR is converted to a ready-for-review status.
The new implementation compares PR trigger map items to a PR readiness status with three possible values:
draft
,ready_for_review
andconverted_to_ready_for_review
this way:If the draft PR trigger is enabled:
pull_request_ready_state=draft
→ trigger a buildpull_request_ready_state=ready_for_review
→ trigger a buildpull_request_ready_state=converted_to_ready_for_review
→ skip build (only the ready state has changed, build was already running on this state of the code)If the draft PR trigger is disabled:
pull_request_ready_state=draft
→ skip a buildpull_request_ready_state=ready_for_review
→ trigger a buildpull_request_ready_state=converted_to_ready_for_review
→ trigger a build (state changed to ready to review)The new comparison is aligned with the related webhook service changes: bitrise-io/bitrise-webhooks#158
Changes
trigger
andtrigger-check
commands'--draft-pr
flag was replaced by thepr-ready-state
flagRunAndTriggerParamsModel
sdraft-pr
property was replaced by thePRReadyState
property