merge-pr
Squash-complete a PR, sync local main, delete the feature branch.
Squash-completes an Azure DevOps PR by id (the only merge type the target repos allow). Polls until the PR shows completed, deletes the source branch, then syncs local main (git fetch + git merge --ff-only) and deletes the matching local feature branch if any.
Category: Git / pull requests
Tags: merge squash pull-request pr azure-devops cleanup
Usage
noclickops merge-pr <pr-id>
Flags
| Flag | Description |
|---|---|
-h, --help | Show this help and exit. |
Example
noclickops merge-pr 4779
Example output
noclickops merge-pr v1.7.6 — PR #4779 in ABC100001-myservice
==> Completing PR #4779 (squash, delete source branch)
ℹ Waiting for completion...
✓ PR #4779 completed.
==> Syncing local main and cleaning up
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
✓ Deleted local branch feature/login
✓ Local main synced with origin/main.
Auth
az login to the target's ADO tenant.
Depends on
azgit
Exit codes
| Code | Meaning |
|---|---|
0 | Merged — local main aligned to origin/main. |
1 | PR not found, blocked by branch policy, or az/git error. |
See also
Full --help output
Show full --help
noclickops v1.7.6 — merge-pr
Squash-complete a PR, sync local main, delete the feature branch.
Squash-completes an Azure DevOps PR by id (the only merge type the target repos allow). Polls until the PR shows completed, deletes the source branch, then syncs local main (git fetch + git merge --ff-only) and deletes the matching local feature branch if any.
Category: git
Tags: merge squash pull-request pr azure-devops cleanup
Usage:
noclickops merge-pr <pr-id>
Flags:
-h, --help Show this help and exit.
Example:
noclickops merge-pr 4779
Example output:
noclickops merge-pr v1.7.6 — PR #4779 in ABC100001-myservice
==> Completing PR #4779 (squash, delete source branch)
ℹ Waiting for completion...
✓ PR #4779 completed.
==> Syncing local main and cleaning up
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
✓ Deleted local branch feature/login
✓ Local main synced with origin/main.
Auth:
az login to the target's ADO tenant.
Depends on:
az git
Exit codes:
0 Merged — local main aligned to origin/main.
1 PR not found, blocked by branch policy, or az/git error.
See also:
create-pr add-service