-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jarred/fixes-14716
- Loading branch information
Showing
5 changed files
with
118 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const body = process.env.GITHUB_ISSUE_BODY; | ||
const SENTRY_AUTH_TOKEN = process.env.SENTRY_AUTH_TOKEN; | ||
|
||
if (!body || !SENTRY_AUTH_TOKEN) { | ||
throw new Error("Missing environment variables"); | ||
} | ||
|
||
const id = body.indexOf("<!-- sentry_id: "); | ||
const endIdLine = body.indexOf(" -->", id + 1); | ||
if (!(id > -1 && endIdLine > -1)) { | ||
throw new Error("Missing sentry_id"); | ||
} | ||
const sentryId = body.slice(id + "<!-- sentry_id: ".length, endIdLine).trim(); | ||
if (!sentryId) { | ||
throw new Error("Missing sentry_id"); | ||
} | ||
|
||
const response = await fetch(`https://sentry.io/api/0/organizations/4507155222364160/eventids/${sentryId}/`, { | ||
headers: { | ||
Authorization: `Bearer ${SENTRY_AUTH_TOKEN}`, | ||
}, | ||
}); | ||
if (!response.ok) { | ||
throw new Error(`Failed to fetch Sentry event: ${response.statusText}`); | ||
} | ||
const json = await response.json(); | ||
const groupId = json?.groupId; | ||
if (!groupId) { | ||
throw new Error("Missing groupId"); | ||
} | ||
|
||
const issueResponse = await fetch(`https://sentry.io/api/0/issues/${groupId}/`, { | ||
headers: { | ||
Authorization: `Bearer ${SENTRY_AUTH_TOKEN}`, | ||
}, | ||
}); | ||
if (!issueResponse.ok) { | ||
throw new Error(`Failed to fetch Sentry issue: ${issueResponse.statusText}`); | ||
} | ||
const { shortId, permalink } = await issueResponse.json(); | ||
if (!shortId || !permalink) { | ||
throw new Error("Missing shortId or permalink"); | ||
} | ||
|
||
console.log(`Sentry ID: ${shortId}`); | ||
console.log(`Sentry permalink: ${permalink}`); | ||
|
||
await Bun.write("sentry-id.txt", shortId); | ||
await Bun.write("sentry-link.txt", permalink); | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,6 @@ it("should not error when package.json has comments and trailing commas", async | |
"dependencies": { | ||
"bar": "^1", | ||
}, | ||
} | ||
`, | ||
); | ||
|
@@ -6348,14 +6347,14 @@ cache = false | |
expect(err1).toContain("Saved lockfile"); | ||
const out1 = await new Response(stdout1).text(); | ||
expect(out1.replace(/\s*\[[0-9\.]+m?s\]\s*$/, "").split(/\r?\n/)).toEqual([ | ||
expect.stringContaining("bun install v1."), | ||
`bun install ${Bun.version_with_sha}`, | ||
"", | ||
"+ [email protected]", | ||
"+ [email protected]", | ||
"+ [email protected]", | ||
"+ [email protected]", | ||
"", | ||
"120 packages installed", | ||
"112 packages installed", | ||
]); | ||
expect(await exited1).toBe(0); | ||
expect(await readdirSorted(package_dir)).toEqual(["bun.lockb", "bunfig.toml", "node_modules", "package.json"]); | ||
|
@@ -6384,7 +6383,6 @@ cache = false | |
"dir-glob", | ||
"emoji-regex", | ||
"error-ex", | ||
"escape-string-regexp", | ||
"eslint-formatter-pretty", | ||
"eslint-rule-docs", | ||
"fast-glob", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters