@sentry/junior-github 0.278.0 → 0.280.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-IR7D5MR7.js → chunk-NSAVG2P3.js} +8 -8
- package/dist/db/schema.d.ts +1 -1
- package/dist/events/release.d.ts +1 -1
- package/dist/events/scope.d.ts +1 -1
- package/dist/index.js +501 -838
- package/dist/issue-outcomes/store.d.ts +1 -1
- package/dist/pull-request-outcomes/store.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/tool-support/github-api.d.ts +40 -0
- package/dist/tools/stack-pull-request.d.ts +1 -1
- package/dist/webhooks/handler.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/webhooks/events.ts
|
|
2
|
-
import
|
|
2
|
+
import * as z4 from "zod";
|
|
3
3
|
|
|
4
4
|
// src/events/deployment.ts
|
|
5
5
|
import {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
eventMatchFieldsSchema
|
|
12
12
|
} from "@sentry/junior-plugin-api";
|
|
13
|
-
import
|
|
13
|
+
import * as z from "zod";
|
|
14
14
|
var gitHubRepoDataSchema = z.string().min(1).toLowerCase();
|
|
15
15
|
var gitHubCommitShaDataSchema = z.string().regex(/^[0-9a-f]{40}$/i).toLowerCase();
|
|
16
16
|
function gitHubRepoMatchFields(events) {
|
|
@@ -341,7 +341,7 @@ function gitHubPullRequestSubscribable(input) {
|
|
|
341
341
|
import {
|
|
342
342
|
eventMatchFieldsSchema as eventMatchFieldsSchema6
|
|
343
343
|
} from "@sentry/junior-plugin-api";
|
|
344
|
-
import
|
|
344
|
+
import * as z2 from "zod";
|
|
345
345
|
var GITHUB_RELEASE_EVENTS = ["release.published"];
|
|
346
346
|
var gitHubReleaseTagDataSchema = z2.string().trim().min(1).transform(
|
|
347
347
|
(tag) => tag.replace(/[A-Z]+/g, (letters) => letters.toLowerCase())
|
|
@@ -418,7 +418,7 @@ function gitHubRepositorySubscribable(input) {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
// src/webhooks/check-suite.ts
|
|
421
|
-
import
|
|
421
|
+
import * as z3 from "zod";
|
|
422
422
|
|
|
423
423
|
// src/credential-support.ts
|
|
424
424
|
import { createPrivateKey, createSign } from "crypto";
|
|
@@ -1526,20 +1526,20 @@ async function loadCheckSuiteFacts(args) {
|
|
|
1526
1526
|
repositories: [target.repoName]
|
|
1527
1527
|
});
|
|
1528
1528
|
const loaded = await Promise.all(
|
|
1529
|
-
target.pullRequestNumbers.map(async (
|
|
1529
|
+
target.pullRequestNumbers.map(async (number3) => {
|
|
1530
1530
|
try {
|
|
1531
1531
|
const response = await githubRequest(
|
|
1532
1532
|
"https://api.github.com",
|
|
1533
|
-
`/repos/${encodeURIComponent(target.owner)}/${encodeURIComponent(target.repoName)}/pulls/${
|
|
1533
|
+
`/repos/${encodeURIComponent(target.owner)}/${encodeURIComponent(target.repoName)}/pulls/${number3}`,
|
|
1534
1534
|
{ token: token.token }
|
|
1535
1535
|
);
|
|
1536
1536
|
const loadedFacts = pullRequestFactsFromResponse(response);
|
|
1537
|
-
return loadedFacts ? [
|
|
1537
|
+
return loadedFacts ? [number3, loadedFacts] : void 0;
|
|
1538
1538
|
} catch (error) {
|
|
1539
1539
|
if (!isGitHubNotFoundError(error)) {
|
|
1540
1540
|
args.log?.error("GitHub pull request data load failed", {
|
|
1541
1541
|
errorType: error instanceof Error ? error.name : "UnknownError",
|
|
1542
|
-
pullRequest:
|
|
1542
|
+
pullRequest: number3,
|
|
1543
1543
|
repository: `${target.owner}/${target.repoName}`
|
|
1544
1544
|
});
|
|
1545
1545
|
}
|
package/dist/db/schema.d.ts
CHANGED
package/dist/events/release.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
|
-
import
|
|
2
|
+
import * as z from "zod";
|
|
3
3
|
export declare const GITHUB_RELEASE_EVENTS: readonly ["release.published"];
|
|
4
4
|
/**
|
|
5
5
|
* `tag` in event data: the trimmed tag with ASCII letters in lowercase. The
|
package/dist/events/scope.d.ts
CHANGED