Skip to content

Commit d4124d1

Browse files
committed
git spr amend
commit-id:bfbe4b65
1 parent c680563 commit d4124d1

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

cmd/spr/main.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,25 @@ VERSION: fork of {{.Version}}
249249
},
250250
},
251251
},
252+
{
253+
Name: "amend",
254+
Aliases: []string{"a"},
255+
Usage: "Amend a commit in the stack",
256+
Flags: []cli.Flag{
257+
&cli.BoolFlag{
258+
Name: "update",
259+
Aliases: []string{"u"},
260+
Usage: "Run spr update after amend",
261+
},
262+
},
263+
Action: func(c *cli.Context) error {
264+
stackedpr.AmendCommit(ctx)
265+
if c.Bool("update") {
266+
stackedpr.UpdatePullRequests(ctx, nil, nil)
267+
}
268+
return nil
269+
},
270+
},
252271
{
253272
Name: "edit",
254273
Aliases: []string{"e"},

0 commit comments

Comments
 (0)