Skip to content
Snippets Groups Projects

feat: rotate personal, project or group access tokens

1 unresolved thread
Compare and Show latest version
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -81,7 +81,7 @@ func NewCmdRevoke(f *cmdutils.Factory, runE func(opts *RevokeOptions) error) *co
}
if opts.Group != "" && opts.User != "" {
return cmdutils.FlagError{Err: errors.New("--group and --user are mutual exclusive.")}
return cmdutils.FlagError{Err: errors.New("'--group' and '--user' are mutually exclusive.")}
}
if runE != nil {
@@ -131,7 +131,7 @@ func revokeTokenRun(opts *RevokeOptions) error {
case 0:
return cmdutils.FlagError{Err: fmt.Errorf("no token found with the name '%v'.", opts.Name)}
default:
return cmdutils.FlagError{Err: fmt.Errorf("multiple tokens found with the name '%v', use the ID instead.", opts.Name)}
return cmdutils.FlagError{Err: fmt.Errorf("multiple tokens found with the name '%v'. Use the ID instead.", opts.Name)}
}
if err = api.RevokePersonalAccessToken(httpClient, token.ID); err != nil {
return err
Loading