curl --request GET \
--url https://api.example.com/orgs/{org_id}/nodes/{node_id}/branches/diff/{source_branch}..{target_branch}{
"source_branch": "<string>",
"target_branch": "<string>",
"source_commit": "<string>",
"target_commit": "<string>",
"can_merge": true,
"commits_ahead": 123,
"commits_behind": 123,
"merge_reason": "<string>",
"has_conflicts": false,
"comparison": {}
}Compare two branches for pull request creation.
curl --request GET \
--url https://api.example.com/orgs/{org_id}/nodes/{node_id}/branches/diff/{source_branch}..{target_branch}{
"source_branch": "<string>",
"target_branch": "<string>",
"source_commit": "<string>",
"target_commit": "<string>",
"can_merge": true,
"commits_ahead": 123,
"commits_behind": 123,
"merge_reason": "<string>",
"has_conflicts": false,
"comparison": {}
}Successful Response
Response model for branch comparison.
Source branch name
Target branch name
Source branch HEAD commit
Target branch HEAD commit
Whether branches can be merged via fast-forward
Number of commits source is ahead of target
Number of commits source is behind target
Reason if merge is not possible
Whether merge would have conflicts
Additional comparison data