@sentry/junior-github 0.302.0 → 0.303.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/events-CrbJHQ0w.js +2466 -0
- package/dist/index.d.ts +71 -3
- package/dist/index.js +7185 -8133
- package/dist/testing.d.ts +51 -1
- package/dist/testing.js +1 -6
- package/package.json +10 -13
- package/dist/account-links.d.ts +0 -8
- package/dist/annotations.d.ts +0 -33
- package/dist/chunk-6SOJ5TN6.js +0 -2618
- package/dist/clone-command.d.ts +0 -7
- package/dist/configured-repository.d.ts +0 -10
- package/dist/conversation-title-context.d.ts +0 -20
- package/dist/credential-support.d.ts +0 -107
- package/dist/db/database.d.ts +0 -5
- package/dist/db/schema.d.ts +0 -1412
- package/dist/default-branch.d.ts +0 -15
- package/dist/draft-readiness.d.ts +0 -31
- package/dist/egress-policy.d.ts +0 -25
- package/dist/events/comment.d.ts +0 -14
- package/dist/events/declarations.d.ts +0 -18
- package/dist/events/deployment.d.ts +0 -38
- package/dist/events/issue.d.ts +0 -42
- package/dist/events/pull-request.d.ts +0 -75
- package/dist/events/release.d.ts +0 -42
- package/dist/events/repository.d.ts +0 -23
- package/dist/events/resource-url.d.ts +0 -5
- package/dist/events/scope.d.ts +0 -13
- package/dist/git-config.d.ts +0 -52
- package/dist/github-status.d.ts +0 -16
- package/dist/graphql-documents.d.ts +0 -44
- package/dist/hooks-path-command.d.ts +0 -5
- package/dist/images.d.ts +0 -8
- package/dist/issue-outcomes/store.d.ts +0 -42
- package/dist/merge-conflict-checks/heartbeat.d.ts +0 -31
- package/dist/merge-conflict-checks/policy.d.ts +0 -74
- package/dist/merge-conflict-checks/store.d.ts +0 -44
- package/dist/merge-conflict-checks/webhooks.d.ts +0 -23
- package/dist/object-facts.d.ts +0 -29
- package/dist/permissions.d.ts +0 -6
- package/dist/plugin.d.ts +0 -45
- package/dist/pull-request-outcomes/apply.d.ts +0 -22
- package/dist/pull-request-outcomes/commit-composition.d.ts +0 -6
- package/dist/pull-request-outcomes/reconcile.d.ts +0 -42
- package/dist/pull-request-outcomes/store.d.ts +0 -120
- package/dist/pull-request-requesters/draft-reviewers.d.ts +0 -15
- package/dist/pull-request-requesters/store.d.ts +0 -41
- package/dist/pull-request-review-policy.d.ts +0 -6
- package/dist/receive-pack-policy.d.ts +0 -21
- package/dist/reply-markdown.d.ts +0 -18
- package/dist/sandbox-paths.d.ts +0 -4
- package/dist/tool-support/attribution.d.ts +0 -52
- package/dist/tool-support/github-api.d.ts +0 -51
- package/dist/tool-support/github-text.d.ts +0 -8
- package/dist/tool-support/pull-request-description.d.ts +0 -8
- package/dist/tools/clone-repository.d.ts +0 -287
- package/dist/tools/comment-on-issue.d.ts +0 -289
- package/dist/tools/comment-on-pull-request.d.ts +0 -294
- package/dist/tools/create-issue.d.ts +0 -300
- package/dist/tools/create-pull-request.d.ts +0 -322
- package/dist/tools/footer.d.ts +0 -17
- package/dist/tools/get-deployment.d.ts +0 -346
- package/dist/tools/get-issue.d.ts +0 -330
- package/dist/tools/get-pull-request.d.ts +0 -358
- package/dist/tools/get-release.d.ts +0 -325
- package/dist/tools/get-repository.d.ts +0 -308
- package/dist/tools/get-status.d.ts +0 -295
- package/dist/tools/react-to-issue.d.ts +0 -289
- package/dist/tools/resolve-pull-request-review-thread.d.ts +0 -288
- package/dist/tools/stack-pull-request.d.ts +0 -43
- package/dist/tools/submit-pull-request-review.d.ts +0 -300
- package/dist/tools/update-issue-comment.d.ts +0 -290
- package/dist/tools/update-issue.d.ts +0 -331
- package/dist/tools/update-pull-request-feedback.d.ts +0 -324
- package/dist/tools/update-pull-request.d.ts +0 -338
- package/dist/tools.d.ts +0 -13
- package/dist/webhooks/check-suite.d.ts +0 -121
- package/dist/webhooks/event-targets.d.ts +0 -44
- package/dist/webhooks/events.d.ts +0 -23
- package/dist/webhooks/fail-open-log.d.ts +0 -10
- package/dist/webhooks/handler.d.ts +0 -57
- package/dist/webhooks/installation-requests.d.ts +0 -105
- package/dist/webhooks/issue-outcome.d.ts +0 -11
- package/dist/webhooks/issue-update.d.ts +0 -8
- package/dist/webhooks/merge-conflict.d.ts +0 -53
- package/dist/webhooks/ownership.d.ts +0 -14
- package/dist/webhooks/pull-request-action.d.ts +0 -37
- package/dist/webhooks/pull-request-activity.d.ts +0 -11
- package/dist/webhooks/pull-request-match-data.d.ts +0 -31
- package/dist/webhooks/pull-request-outcome.d.ts +0 -16
- package/dist/webhooks/pull-request-people.d.ts +0 -51
- package/dist/webhooks/pull-request-preview.d.ts +0 -12
- package/dist/webhooks/pull-request-ready-reviewers.d.ts +0 -25
- package/dist/workspace-prepare.d.ts +0 -3
package/dist/testing.d.ts
CHANGED
|
@@ -1,2 +1,52 @@
|
|
|
1
1
|
/** Test-only access to GitHub webhook normalization for runtime eval fixtures. */
|
|
2
|
-
|
|
2
|
+
import { EventInput } from "@sentry/junior-plugin-api";
|
|
3
|
+
/** One incident from githubstatus.com. */
|
|
4
|
+
type GitHubStatusIncident = {
|
|
5
|
+
components: string[];
|
|
6
|
+
impact: string;
|
|
7
|
+
name: string;
|
|
8
|
+
resolvedAt?: string;
|
|
9
|
+
startedAt: string;
|
|
10
|
+
status: string;
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
type GitHubFailingCheck = {
|
|
14
|
+
checkRunId: number;
|
|
15
|
+
conclusion: string;
|
|
16
|
+
htmlUrl?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
};
|
|
19
|
+
/** Pull request values filled in when a match filter needs them. */
|
|
20
|
+
type GitHubCheckSuitePullRequestFacts = {
|
|
21
|
+
openerEmail?: string;
|
|
22
|
+
openerUsername?: string;
|
|
23
|
+
isDraft?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/** Optional values for one check suite event. */
|
|
26
|
+
type GitHubCheckSuiteFacts = {
|
|
27
|
+
failingChecks?: GitHubFailingCheck[];
|
|
28
|
+
/** Open or recent githubstatus.com incidents when the suite failed. */
|
|
29
|
+
githubIncidents?: GitHubStatusIncident[];
|
|
30
|
+
/**
|
|
31
|
+
* True when this suite passed and every other check suite on its head
|
|
32
|
+
* commit passed too. Set only when something listens for
|
|
33
|
+
* `pull_request.checks.passed`.
|
|
34
|
+
*/
|
|
35
|
+
allCheckSuitesPassed?: boolean;
|
|
36
|
+
/** Pull request values by number when a match filter needs them. */
|
|
37
|
+
pullRequestFactsByNumber?: Record<number, GitHubCheckSuitePullRequestFacts>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Normalize one verified GitHub delivery into conversation events.
|
|
41
|
+
*
|
|
42
|
+
* Comments and reviews written by the configured bot are dropped, so Junior
|
|
43
|
+
* does not react to or act on its own feedback.
|
|
44
|
+
*/
|
|
45
|
+
export declare function normalizeGitHubEvents(args: {
|
|
46
|
+
body: unknown;
|
|
47
|
+
botEmail?: string | undefined;
|
|
48
|
+
checkSuiteFacts?: GitHubCheckSuiteFacts;
|
|
49
|
+
deliveryId: string;
|
|
50
|
+
eventName: string;
|
|
51
|
+
}): EventInput[];
|
|
52
|
+
export {};
|
package/dist/testing.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.303.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,36 +29,33 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@0no-co/graphql.web": "^1.3.4",
|
|
32
|
+
"@sentry/junior-plugin-api": "0.303.0",
|
|
32
33
|
"@sinclair/typebox": "^0.34.49",
|
|
33
34
|
"drizzle-orm": "^0.45.4",
|
|
34
35
|
"ignore": "^7.0.5",
|
|
35
36
|
"marked": "^18.1.2",
|
|
36
|
-
"mdast-util-from-markdown": "^2.0
|
|
37
|
+
"mdast-util-from-markdown": "^2.1.0",
|
|
37
38
|
"mdast-util-gfm": "^3.1.0",
|
|
38
39
|
"micromark-extension-gfm": "^3.0.0",
|
|
39
40
|
"parse5": "^7.3.0",
|
|
40
|
-
"zod": "^4.6.7"
|
|
41
|
-
"@sentry/junior-plugin-api": "0.302.0"
|
|
41
|
+
"zod": "^4.6.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@
|
|
44
|
+
"@sentry/junior-testing": "0.0.0",
|
|
45
45
|
"@types/mdast": "^4.0.4",
|
|
46
|
-
"@types/node": "^
|
|
46
|
+
"@types/node": "^24.19.2",
|
|
47
47
|
"@types/pg": "^8.15.6",
|
|
48
48
|
"drizzle-kit": "^0.31.8",
|
|
49
49
|
"graphql": "^16.14.0",
|
|
50
50
|
"msw": "^2.14.6",
|
|
51
|
-
"oxlint": "^1.79.0",
|
|
52
51
|
"pg": "^8.16.3",
|
|
53
|
-
"
|
|
54
|
-
"typescript": "
|
|
55
|
-
"vitest": "^4.1.12"
|
|
56
|
-
"@sentry/junior-testing": "0.0.0"
|
|
52
|
+
"tsdown": "0.23.7",
|
|
53
|
+
"typescript": "7.0.2",
|
|
54
|
+
"vitest": "^4.1.12"
|
|
57
55
|
},
|
|
58
56
|
"scripts": {
|
|
59
|
-
"build": "
|
|
57
|
+
"build": "tsdown",
|
|
60
58
|
"db:generate": "pnpm exec drizzle-kit generate --config drizzle.config.ts",
|
|
61
|
-
"lint": "oxlint --config ../junior/.oxlintrc.json --deny-warnings src tests tsup.config.ts vitest.config.ts",
|
|
62
59
|
"test": "vitest run",
|
|
63
60
|
"typecheck": "tsc --noEmit"
|
|
64
61
|
}
|
package/dist/account-links.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PluginObjectLinkDefinition } from "@sentry/junior-plugin-api";
|
|
2
|
-
/**
|
|
3
|
-
* GitHub profile links, such as `https://github.com/octocat`. A login that
|
|
4
|
-
* links to a known person shows their Junior person card. Any other login
|
|
5
|
-
* shows a GitHub account card. Both come from the link alone, so the card
|
|
6
|
-
* needs no GitHub request.
|
|
7
|
-
*/
|
|
8
|
-
export declare const githubAccountLinks: PluginObjectLinkDefinition;
|
package/dist/annotations.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { type ConversationAnnotation, type ConversationSidebarAnnotation, type ObjectAnnotation, type PluginAnnotations, type PluginConversationAnnotations, type PluginLogger } from "@sentry/junior-plugin-api";
|
|
2
|
-
/** Return GitHub annotations for a conversation row, newest first. */
|
|
3
|
-
export declare function githubSidebarAnnotations(annotations: ConversationAnnotation[]): ConversationSidebarAnnotation[];
|
|
4
|
-
/** Build the annotation returned by GitHub create and update tools. */
|
|
5
|
-
export declare function githubObjectAnnotation(input: {
|
|
6
|
-
repo: string;
|
|
7
|
-
number: number;
|
|
8
|
-
title: string;
|
|
9
|
-
url: string;
|
|
10
|
-
objectType: "task" | "code_change";
|
|
11
|
-
status: string;
|
|
12
|
-
facts?: ObjectAnnotation["facts"];
|
|
13
|
-
sourceUpdatedAt?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
}): ObjectAnnotation;
|
|
16
|
-
/** Refresh an existing object's status without selecting a card for delivery. */
|
|
17
|
-
declare function updateGitHubAnnotation(store: PluginAnnotations, input: {
|
|
18
|
-
repo: string;
|
|
19
|
-
number: number;
|
|
20
|
-
objectType: "task" | "code_change";
|
|
21
|
-
status: "merged" | "closed";
|
|
22
|
-
}): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Refresh the status of one object in each linked conversation. One failed
|
|
25
|
-
* conversation does not stop the others. Each failure is logged.
|
|
26
|
-
*/
|
|
27
|
-
export declare function updateGitHubAnnotations(args: {
|
|
28
|
-
annotations: PluginConversationAnnotations;
|
|
29
|
-
conversationIds: string[];
|
|
30
|
-
log?: Pick<PluginLogger, "error">;
|
|
31
|
-
update: Parameters<typeof updateGitHubAnnotation>[1];
|
|
32
|
-
}): Promise<void>;
|
|
33
|
-
export {};
|