mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
feat(check): resolve build log url for failed check suites via GitHub API
check_suite payloads carry no details_url; the build log lives on the underlying check_run. For failed suites, fetch the suite's check runs with an installation token and inject the first run's details_url (preferring the Cloudflare run) as a Build Log field.
This commit is contained in:
parent
b2db616865
commit
449739ee97
3 changed files with 79 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ function pemToBinary(pem: string): ArrayBuffer {
|
|||
}
|
||||
|
||||
/** GitHub App JWT (RS256, PKCS#8 PEM key), valid ~10 minutes. */
|
||||
async function createAppJwt(appId: string, privateKey: string): Promise<string> {
|
||||
export async function createAppJwt(appId: string, privateKey: string): Promise<string> {
|
||||
const now = Math.floor(Date.now() / 1000);
|
||||
const header = b64url(JSON.stringify({ alg: "RS256", typ: "JWT" }));
|
||||
const payload = b64url(JSON.stringify({ iat: now - 60, exp: now + 600, iss: appId }));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue