@@ -132,8 +132,8 @@ func setRun(opts *SetOptions) error {
132132 }
133133
134134 var pk * PubKey
135- if opts . OrgName != "" {
136- pk , err = getOrgPublicKey (client , opts . OrgName )
135+ if orgName != "" {
136+ pk , err = getOrgPublicKey (client , orgName )
137137 } else {
138138 pk , err = getRepoPubKey (client , baseRepo )
139139 }
@@ -148,7 +148,7 @@ func setRun(opts *SetOptions) error {
148148
149149 encoded := base64 .StdEncoding .EncodeToString (eBody )
150150
151- if opts . OrgName != "" {
151+ if orgName != "" {
152152 err = putOrgSecret (client , pk , * opts , encoded )
153153 } else {
154154 err = putRepoSecret (client , pk , baseRepo , opts .SecretName , encoded )
@@ -159,7 +159,12 @@ func setRun(opts *SetOptions) error {
159159
160160 if opts .IO .IsStdoutTTY () {
161161 cs := opts .IO .ColorScheme ()
162- fmt .Fprintf (opts .IO .Out , "%s Set secret %s\n " , cs .SuccessIcon (), opts .SecretName )
162+
163+ if orgName == "" {
164+ fmt .Fprintf (opts .IO .Out , "%s Set secret %s for %s\n " , cs .SuccessIcon (), opts .SecretName , ghrepo .FullName (baseRepo ))
165+ } else {
166+ fmt .Fprintf (opts .IO .Out , "%s Set secret %s for %s\n " , cs .SuccessIcon (), opts .SecretName , orgName )
167+ }
163168 }
164169
165170 return nil
0 commit comments