~emersion/yojo

3d2d83b0d277358a2eca8029c31f90e494c7d849 — Simon Ser 18 days ago 7f2f326 master
Fix nil OAuth *http.Client
2 files changed, 3 insertions(+), 0 deletions(-)

M job.go
M main.go
M job.go => job.go +2 -0
@@ 18,9 18,11 @@ import (

func handleCommit(ctx context.Context, event *giteaCommitEvent, installation *Installation) error {
	srhtClient := newSrhtClient(&oauth2.TokenResp{
		TokenType:   oauth2.TokenTypeBearer,
		AccessToken: installation.SrhtAccessToken,
	})
	giteaClient, err := newGiteaClient(ctx, installation.GiteaEndpoint, &oauth2.TokenResp{
		TokenType:   oauth2.TokenTypeBearer,
		AccessToken: installation.GiteaAccessToken,
	})
	if err != nil {

M main.go => main.go +1 -0
@@ 261,6 261,7 @@ func main() {
		if r.URL.Query().Has("custom") {
			endpoint = strings.TrimSuffix(r.FormValue("endpoint"), "/")
			tokenResp = &oauth2.TokenResp{
				TokenType:   oauth2.TokenTypeBearer,
				AccessToken: r.FormValue("token"),
			}