Skip to main content

create-pr

Open an Azure DevOps PR from the current branch to main.

Opens an Azure DevOps PR from the current git branch to main. Auto-pushes the branch (sets upstream) if it has no tracking ref yet. Title is required; description defaults to the title. Refuses to run on main.

Category: Git / pull requests
Tags: pull-request pr azure-devops branch push review

Usage

noclickops create-pr "<title>" ["<description>"]

Flags

FlagDescription
-h, --helpShow this help and exit.

Example

noclickops create-pr "feat: add login flow"

Example output

noclickops create-pr v1.7.6 — 'feat: add login flow' (feature/login → main) in ABC100001-myservice

==> Creating PR 'feat: add login flow' (feature/login → main) in ABC100001-myservice
✓ Created PR #4901
https://dev.azure.com/<org>/.../pullrequest/4901

ℹ Next: noclickops merge-pr 4901

Auth

az login to the target's ADO tenant; first run also installs the azure-devops extension automatically.

Depends on

  • az
  • git

Exit codes

CodeMeaning
0PR opened — prints the PR id and URL.
1Not in a git repo, on main branch, missing title, or az/git error.

See also

Full --help output

Show full --help
noclickops v1.7.6 — create-pr

Open an Azure DevOps PR from the current branch to main.

Opens an Azure DevOps PR from the current git branch to main. Auto-pushes the branch (sets upstream) if it has no tracking ref yet. Title is required; description defaults to the title. Refuses to run on main.

Category: git
Tags: pull-request pr azure-devops branch push review

Usage:
noclickops create-pr "<title>" ["<description>"]

Flags:
-h, --help Show this help and exit.

Example:
noclickops create-pr "feat: add login flow"

Example output:
noclickops create-pr v1.7.6 — 'feat: add login flow' (feature/login → main) in ABC100001-myservice

==> Creating PR 'feat: add login flow' (feature/login → main) in ABC100001-myservice
✓ Created PR #4901
https://dev.azure.com/<org>/.../pullrequest/4901

ℹ Next: noclickops merge-pr 4901

Auth:
az login to the target's ADO tenant; first run also installs the azure-devops extension automatically.

Depends on:
az git

Exit codes:
0 PR opened — prints the PR id and URL.
1 Not in a git repo, on main branch, missing title, or az/git error.

See also:
merge-pr