merge_request
Boomi AtomSphere API: MergeRequest Object
You can use the Merge Request object to create and manage merge requests to merge changes in a development branch to another branch.
The Modifies or update a MergeRequest object is not implemented because of the complexity of the request. Create the payload and use atomsphere_request directly.
- boomi_cicd.util.merge_request.create_merge_request(source_branch_id, destination_branch_id, strategy, priority_branch)[source]
You can use the Merge Request object to merge a development branch into the main branch. To create a merge request, you need the branch IDs for the source and destination branches. The source branch is the branch you want to merge into the destination branch.
- Parameters:
source_branch_id (str) – The source branch ID.
destination_branch_id (str) – The destination branch ID.
strategy (str) – The merge strategy. Must be ‘OVERRIDE’ or ‘CONFLICT_RESOLVE’. There are two merge request strategies you can choose from: OVERRIDE or CONFLICT_RESOLVE. An override merge automatically resolves any merge conflicts by prioritizing the branch specified in the priorityBranch field. If you choose the CONFLICT_RESOLVE strategy, you have the opportunity to review any conflicts and choose which version you want to keep.
priority_branch (str) – The priority branch for conflict resolution. Must be ‘SOURCE’ or ‘DESTINATION’.
- Returns:
The merge request creation response id. Return contains the merge request ID.
- Return type:
str
- boomi_cicd.util.merge_request.execute_merge_request(merge_request_id, action)[source]
Execute a merge request by its ID.
- Parameters:
merge_request_id (str) – The merge request ID.
- Returns:
The merge request execution response. Return contains original response data from API.
- Return type:
dict
- boomi_cicd.util.merge_request.get_merge_request(merge_request_id)[source]
Get a merge request by its ID.
- Parameters:
merge_request_id (str) – The merge request ID.
- Returns:
The merge request retrieval response. Return contains original response data from API.
- Return type:
dict
- boomi_cicd.util.merge_request.query_merge_request(source_branch_id=None, destination_branch_id=None, stage=None)[source]
Query merge requests based on sourch branch ID, target branch ID, or stage. Source branch ID or target branch ID must be supplied. stage is optional.
- Parameters:
source_branch_id (str) – The source branch ID to filter by.
destination_branch_id (str) – The destination branch ID to filter by.
stage (str) – The stage to filter by. Possible values are “NOT_EXIST”, “DRAFTING”, “FAILED_TO_DRAFT,” “FAILED_TO_REDRAFT”, “DRAFTED”, “REVIEWING”, “MERGING”, “MERGED”, “FAILED_TO_MERGE”, “DELETED”, “REDRAFTING”, and “REVERTED”.
- Returns:
The merge request query response. Return contains original response data from API.
- Return type:
dict