Passer à la navigation

Fusionner une branche dans une branche cible

Merge a branch into a target branch. If both branches changed the same field, the merge returns 409 unless conflict_resolutions settles every conflict the merge preview reports, or force is set.

Paramètres de chemin

agent_idstringRequis

L’ID d’un agent. Il est renvoyé lors de la création de l’agent.

source_branch_idstringRequis

Identifiant unique de la branche source à fusionner.

En-têtes

xi-api-keystringOptionnel

Paramètres de requête

target_branch_idstringRequis

L’ID de la branche cible dans laquelle effectuer la fusion.

Requête

This endpoint expects an object.
archive_source_branchbooleanOptionnelPar défaut true

Indique s’il faut archiver la branche source après la fusion.

forcebooleanOptionnelPar défaut false

Keep the source branch’s value for every conflict instead of sending conflict_resolutions

conflict_resolutionslist of objectsOptionnel

Side to keep, or custom text where the conflict accepts it, for each conflict the preview reported. A merge or rebase with conflicts is rejected unless there is one for every conflict, sent with both tip ids. On a merge it can’t be combined with force, which lets the source win every conflict instead.

source_tip_idstringOptionnel

Source branch tip version the conflicts were resolved against (source_tip_version_id of the preview). The request fails with 409 if the branch moved since.

target_tip_idstringOptionnel

Target branch tip version the conflicts were resolved against (target_tip_version_id of the preview). The request fails with 409 if the branch moved since.

Réponse

Réponse réussie

Erreurs

422
Branches Merge Request Unprocessable Entity Error