Backport #28791 by @yp05327 panic:  After:  Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
parent
84282c608c
commit
df694f6a7d
3 changed files with 9 additions and 0 deletions
|
@ -22,5 +22,8 @@ func GenerateActionsRunnerToken(ctx context.Context, scope string) (string, Resp
|
|||
})
|
||||
|
||||
resp, extra := requestJSONResp(req, &responseText{})
|
||||
if resp == nil {
|
||||
return "", extra
|
||||
}
|
||||
return resp.Text, extra
|
||||
}
|
||||
|
|
|
@ -27,5 +27,8 @@ func AuthorizedPublicKeyByContent(ctx context.Context, content string) (string,
|
|||
req := newInternalRequest(ctx, reqURL, "POST")
|
||||
req.Param("content", content)
|
||||
resp, extra := requestJSONResp(req, &responseText{})
|
||||
if resp == nil {
|
||||
return "", extra
|
||||
}
|
||||
return resp.Text, extra
|
||||
}
|
||||
|
|
|
@ -30,5 +30,8 @@ func SendEmail(ctx context.Context, subject, message string, to []string) (strin
|
|||
})
|
||||
|
||||
resp, extra := requestJSONResp(req, &responseText{})
|
||||
if resp == nil {
|
||||
return "", extra
|
||||
}
|
||||
return resp.Text, extra
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue