Skip to content

Commit 8a9cabc

Browse files
yp05327silverwind
authored andcommitted
1 parent 8f21815 commit 8a9cabc

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

modules/private/actions.go

+3
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ func GenerateActionsRunnerToken(ctx context.Context, scope string) (string, Resp
2222
})
2323

2424
resp, extra := requestJSONResp(req, &responseText{})
25+
if resp == nil {
26+
return "", extra
27+
}
2528
return resp.Text, extra
2629
}

modules/private/key.go

+3
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,8 @@ func AuthorizedPublicKeyByContent(ctx context.Context, content string) (string,
2727
req := newInternalRequest(ctx, reqURL, "POST")
2828
req.Param("content", content)
2929
resp, extra := requestJSONResp(req, &responseText{})
30+
if resp == nil {
31+
return "", extra
32+
}
3033
return resp.Text, extra
3134
}

modules/private/mail.go

+3
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ func SendEmail(ctx context.Context, subject, message string, to []string) (strin
3030
})
3131

3232
resp, extra := requestJSONResp(req, &responseText{})
33+
if resp == nil {
34+
return "", extra
35+
}
3336
return resp.Text, extra
3437
}

0 commit comments

Comments
 (0)