@@ -100,11 +100,21 @@ func (i *IssueRequest) Get() ([]Issues, error) {
100100 var body []byte
101101
102102 i .URL = fmt .Sprintf (i .URL , i .org , i .repo )
103+
104+ token := githandler .ConfigGet ("token" , "phlow" )
105+ request , err := http .NewRequest ("GET" , i .URL , nil )
106+ if err != nil {
107+ return nil , err
108+ }
109+ q := request .URL .Query ()
110+ q .Add ("access_token" , token )
111+ request .URL .RawQuery = q .Encode ()
112+
103113 if options .GlobalFlagVerbose {
104- fmt .Println ("github uri: " + i .URL )
114+ fmt .Println ("github uri: " + request .URL . String () )
105115 }
106116
107- if resp , err = i .client .Get ( i . URL ); err != nil {
117+ if resp , err = i .client .Do ( request ); err != nil {
108118 return nil , err
109119 }
110120 if err = requestStatus (resp ); err != nil {
@@ -143,7 +153,7 @@ func createPermissions() (string, error) {
143153 }
144154
145155 perm := Permissions {
146- Scopes : []string {"public_repo" , "repo" , "repo_deployment" },
156+ Scopes : []string {"public_repo" , "repo" , "repo_deployment" , "repo:status" },
147157 Note : note ,
148158 }
149159 b2b , err := json .Marshal (& perm )
0 commit comments