Skip to content

Commit 81b826c

Browse files
authored
av pr help text add mention of updating pr ability (#676)
1 parent 296e06e commit 81b826c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

cmd/av/pr.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,25 @@ var prFlags struct {
3737

3838
var prCmd = &cobra.Command{
3939
Use: "pr",
40-
Short: "Create a pull request for the current branch",
40+
Short: "Create or update a pull request for the current branch",
4141
Long: strings.TrimSpace(`
42-
Create a pull request for the current branch.
42+
Create or update a pull request for the current branch.
43+
44+
When creating a new pull request, an editor opens for the title and body unless
45+
they are provided via flags. If the branch has a parent, the parent must have a
46+
pull request first.
47+
48+
When a pull request already exists, the command just pushes the branch to the
49+
remote without opening an editor. Use --edit to modify the existing description.
4350
4451
Examples:
52+
Push and sync an existing PR (no editor, no extra flags needed):
53+
$ av pr
54+
4555
Create a PR with an empty body:
4656
$ av pr --title "My PR"
4757
48-
Create a pull request, specifying the body of the PR from standard input.
58+
Create a pull request, specifying the body of the PR from standard input:
4959
$ av pr --title "Implement fancy feature" --body - <<EOF
5060
> Implement my very fancy feature.
5161
> Can you please review it?

0 commit comments

Comments
 (0)