Skip to content

Commit

Permalink
lab: Add 'mr resolve' alias to 'mr note'
Browse files Browse the repository at this point in the history
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
  • Loading branch information
prarit committed Dec 6, 2020
1 parent ae4b111 commit 29f9553
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/issue_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ func NoteRunFn(cmd *cobra.Command, args []string) {
if err != nil {
log.Fatal(err)
}
// 'lab mr resolve' always overrides options
if os.Args[2] == "resolve" {
resolve = true
}

quote, err := cmd.Flags().GetBool("quote")
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/mr_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

var mrNoteCmd = &cobra.Command{
Use: "note [remote] <id>[:<comment_id>]",
Aliases: []string{"comment", "reply"},
Aliases: []string{"comment", "reply", "resolve"},
Short: "Add a note or comment to an MR on GitLab",
Long: ``,
PersistentPreRun: LabPersistentPreRun,
Expand Down

0 comments on commit 29f9553

Please sign in to comment.