File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,15 @@ func NewCmdForward() *cobra.Command {
3636 $ gh webhook forward --events=issues --repo=monalisa/smile --url="http://localhost:9999/webhooks"
3737 $ gh webhook forward --events=issues --org=github --url="http://localhost:9999/webhooks"
3838 ` ),
39- RunE : func (* cobra.Command , []string ) error {
39+ RunE : func (c * cobra.Command , _ []string ) error {
4040 if targetRepo == "" && targetOrg == "" {
4141 return errors .New ("`--repo` or `--org` flag required" )
4242 }
4343
44+ if envHost := os .Getenv ("GH_HOST" ); envHost != "" && ! c .Flags ().Changed ("github-host" ) {
45+ githubHost = envHost
46+ }
47+
4448 authToken , err := authTokenForHost (githubHost )
4549 if err != nil {
4650 return fmt .Errorf ("fatal: error fetching gh token: %w" , err )
You can’t perform that action at this time.
0 commit comments