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 MINOR version update
Context
This PR introduced bitrise.yml data model changes to support selective build triggering (per workflow and pipeline build triggers).
Changes
WorkflowModel
andPipelineModel
got a newTriggers
propertyTriggers
property is a structure with (for now) tree fields, that reflect the matching git event type:PushTriggers
,PullRequestTriggers
, andTagTriggers
PushTriggers
,PullRequestTriggers
, andTagTriggers
are lists of the related trigger itemstype
,workflow
, andpipeline
fields are not needed anymore and event type related parts are removed from the filter field names:push_branch
→branch
commit_message
changed_files
enabled
pull_request_source_branch
→source_branch
pull_request_target_branch
→target_branch
pull_request_label
→label
draft_pull_request_enabled
→draft_enabled
pull_request_comment
→comment
commit_message
changed_files
enabled
tag
→name
enabled
Since the new triggers follow a slightly different structure than the original trigger map, the new
Triggers
model is manually parsed by implementing theyaml.Unmarshaler
interface, to be able to warn users about misconfiguration.E.g.: if you simply move an existing trigger map under a workflow's triggers, with the default yaml parsing
bitrise validate
would give this error message:with the custom parsing, this is the error message: