Skip to content

Commit

Permalink
Merge pull request #735 from zampierilucas/improve_file_comment_approval
Browse files Browse the repository at this point in the history
Moved file function to break before approval
  • Loading branch information
bmeneg authored Sep 1, 2021
2 parents 653549a + 4c80927 commit 26d45a3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cmd/mr_approve.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ var mrApproveCmd = &cobra.Command{
log.Fatal(err)
}

if comment || len(msgs) > 0 || filename != "" {
linebreak, err := cmd.Flags().GetBool("force-linebreak")
if err != nil {
log.Fatal(err)
}

createNote(rn, true, int(id), msgs, filename, linebreak, "")
}

err = lab.MRApprove(p.ID, int(id))
if err != nil {
if err == lab.ErrStatusForbidden {
Expand All @@ -59,15 +68,6 @@ var mrApproveCmd = &cobra.Command{
}
}

if comment || len(msgs) > 0 || filename != "" {
linebreak, err := cmd.Flags().GetBool("force-linebreak")
if err != nil {
log.Fatal(err)
}

createNote(rn, true, int(id), msgs, filename, linebreak, "")
}

fmt.Printf("Merge Request !%d approved\n", id)
},
}
Expand Down

0 comments on commit 26d45a3

Please sign in to comment.