Skip to content

Commit

Permalink
cmd: Add PersistentPreRun where it's currently missing
Browse files Browse the repository at this point in the history
`lab ci view` now has the --merge-request flags that may be set in
the config file.

There's probably not much of a use case for setting any of the
`lab mr edit` flags from the config, but pre-process the flags
there as well anyway for consistency.
  • Loading branch information
fmuellner authored and prarit committed Dec 20, 2020
1 parent c743a49 commit fd00962
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/ci_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ var ciViewCmd = &cobra.Command{
Supports vi style (hjkl,Gg) bindings and arrow keys for navigating jobs and logs.
Feedback Encouraged!: https://github.com/zaquestion/lab/issues`,
PersistentPreRun: LabPersistentPreRun,
Run: func(cmd *cobra.Command, args []string) {
a := tview.NewApplication()
defer recoverPanic(a)
Expand Down
1 change: 1 addition & 0 deletions cmd/mr_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ lab MR edit <id> -m "new title" # update title
lab MR edit <id> -m "new title" -m "new desc" # update title & description
lab MR edit <id> -l newlabel --unlabel oldlabel # relabel MR
lab MR edit <id>:<comment_id> # update a comment on MR`,
PersistentPreRun: LabPersistentPreRun,
Run: func(cmd *cobra.Command, args []string) {
rn, idString, err := parseArgsRemoteAndProject(args)
if err != nil {
Expand Down

0 comments on commit fd00962

Please sign in to comment.