@sentry/junior-github 0.264.0 → 0.266.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/README.md +51 -0
- package/dist/{chunk-KWVC6CU5.js → chunk-B6WCXAII.js} +534 -441
- package/dist/credential-support.d.ts +1 -1
- package/dist/db/schema.d.ts +192 -0
- package/dist/events/comment.d.ts +7 -0
- package/dist/events/deployment.d.ts +13 -2
- package/dist/events/issue.d.ts +12 -4
- package/dist/events/pull-request.d.ts +15 -2
- package/dist/events/release.d.ts +25 -2
- package/dist/events/repository.d.ts +10 -1
- package/dist/events/scope.d.ts +13 -0
- package/dist/index.js +819 -545
- package/dist/plugin.d.ts +0 -5
- package/dist/pull-request-requesters/store.d.ts +34 -0
- package/dist/testing.js +1 -1
- package/dist/tool-support/attribution.d.ts +22 -11
- package/dist/tools/update-pull-request.d.ts +1 -0
- package/dist/webhooks/check-suite.d.ts +4 -4
- package/dist/webhooks/event-targets.d.ts +18 -0
- package/dist/webhooks/handler.d.ts +23 -12
- package/dist/webhooks/pull-request-match-data.d.ts +31 -0
- package/dist/webhooks/pull-request-people.d.ts +25 -5
- package/migrations/0009_nostalgic_thing.sql +8 -0
- package/migrations/meta/0009_snapshot.json +404 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +2 -2
- package/dist/webhooks/pull-request-author-role.d.ts +0 -20
|
@@ -47,7 +47,7 @@ export declare const GITHUB_AUTH_TOKEN_PLACEHOLDER = "ghp_host_managed_credentia
|
|
|
47
47
|
export declare const GITHUB_GRAPHQL_RESPONSE_BODY_LIMIT_BYTES: number;
|
|
48
48
|
export declare const HTTP_READ_METHODS: Set<string>;
|
|
49
49
|
export declare const USER_TOKEN_GRANTS: Set<string>;
|
|
50
|
-
export declare const CREATE_TOOL_ROUTING_GUIDANCE = "This is a
|
|
50
|
+
export declare const CREATE_TOOL_ROUTING_GUIDANCE = "This is a tool-routing denial, not a GitHub permission failure. Do not ask the user for GitHub permissions; retry with the required tool.";
|
|
51
51
|
export declare const USER_WRITE_REQUIREMENTS: string[];
|
|
52
52
|
export declare class GitHubPluginSetupError extends Error {
|
|
53
53
|
constructor(message: string);
|
package/dist/db/schema.d.ts
CHANGED
|
@@ -514,6 +514,106 @@ export declare const juniorGitHubPullRequestIssues: import("drizzle-orm/pg-core"
|
|
|
514
514
|
};
|
|
515
515
|
dialect: 'pg';
|
|
516
516
|
}>;
|
|
517
|
+
/**
|
|
518
|
+
* People who asked Junior to open or update a pull request. Each row links
|
|
519
|
+
* the pull request to the Junior identity that acted. The user and any linked
|
|
520
|
+
* GitHub account come from that identity in core when a webhook needs them,
|
|
521
|
+
* so they stay correct when the person links an account later. The first row
|
|
522
|
+
* for a number is the person who asked Junior to open it. The create tool
|
|
523
|
+
* saves that row after GitHub opens the pull request.
|
|
524
|
+
*/
|
|
525
|
+
export declare const juniorGitHubPullRequestRequesters: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
526
|
+
name: "junior_github_pull_request_requesters";
|
|
527
|
+
schema: undefined;
|
|
528
|
+
columns: {
|
|
529
|
+
repositoryFullName: import("drizzle-orm/pg-core").PgColumn<{
|
|
530
|
+
name: "repository_full_name";
|
|
531
|
+
tableName: "junior_github_pull_request_requesters";
|
|
532
|
+
dataType: "string";
|
|
533
|
+
columnType: "PgText";
|
|
534
|
+
data: string;
|
|
535
|
+
driverParam: string;
|
|
536
|
+
notNull: true;
|
|
537
|
+
hasDefault: false;
|
|
538
|
+
isPrimaryKey: false;
|
|
539
|
+
isAutoincrement: false;
|
|
540
|
+
hasRuntimeDefault: false;
|
|
541
|
+
enumValues: [string, ...string[]];
|
|
542
|
+
baseColumn: never;
|
|
543
|
+
identity: undefined;
|
|
544
|
+
generated: undefined;
|
|
545
|
+
}, {}, {}>;
|
|
546
|
+
number: import("drizzle-orm/pg-core").PgColumn<{
|
|
547
|
+
name: "number";
|
|
548
|
+
tableName: "junior_github_pull_request_requesters";
|
|
549
|
+
dataType: "number";
|
|
550
|
+
columnType: "PgInteger";
|
|
551
|
+
data: number;
|
|
552
|
+
driverParam: string | number;
|
|
553
|
+
notNull: true;
|
|
554
|
+
hasDefault: false;
|
|
555
|
+
isPrimaryKey: false;
|
|
556
|
+
isAutoincrement: false;
|
|
557
|
+
hasRuntimeDefault: false;
|
|
558
|
+
enumValues: undefined;
|
|
559
|
+
baseColumn: never;
|
|
560
|
+
identity: undefined;
|
|
561
|
+
generated: undefined;
|
|
562
|
+
}, {}, {}>;
|
|
563
|
+
identityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
564
|
+
name: "identity_id";
|
|
565
|
+
tableName: "junior_github_pull_request_requesters";
|
|
566
|
+
dataType: "string";
|
|
567
|
+
columnType: "PgText";
|
|
568
|
+
data: string;
|
|
569
|
+
driverParam: string;
|
|
570
|
+
notNull: true;
|
|
571
|
+
hasDefault: false;
|
|
572
|
+
isPrimaryKey: false;
|
|
573
|
+
isAutoincrement: false;
|
|
574
|
+
hasRuntimeDefault: false;
|
|
575
|
+
enumValues: [string, ...string[]];
|
|
576
|
+
baseColumn: never;
|
|
577
|
+
identity: undefined;
|
|
578
|
+
generated: undefined;
|
|
579
|
+
}, {}, {}>;
|
|
580
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
581
|
+
name: "created_at";
|
|
582
|
+
tableName: "junior_github_pull_request_requesters";
|
|
583
|
+
dataType: "date";
|
|
584
|
+
columnType: "PgTimestamp";
|
|
585
|
+
data: Date;
|
|
586
|
+
driverParam: string;
|
|
587
|
+
notNull: true;
|
|
588
|
+
hasDefault: false;
|
|
589
|
+
isPrimaryKey: false;
|
|
590
|
+
isAutoincrement: false;
|
|
591
|
+
hasRuntimeDefault: false;
|
|
592
|
+
enumValues: undefined;
|
|
593
|
+
baseColumn: never;
|
|
594
|
+
identity: undefined;
|
|
595
|
+
generated: undefined;
|
|
596
|
+
}, {}, {}>;
|
|
597
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
598
|
+
name: "updated_at";
|
|
599
|
+
tableName: "junior_github_pull_request_requesters";
|
|
600
|
+
dataType: "date";
|
|
601
|
+
columnType: "PgTimestamp";
|
|
602
|
+
data: Date;
|
|
603
|
+
driverParam: string;
|
|
604
|
+
notNull: true;
|
|
605
|
+
hasDefault: false;
|
|
606
|
+
isPrimaryKey: false;
|
|
607
|
+
isAutoincrement: false;
|
|
608
|
+
hasRuntimeDefault: false;
|
|
609
|
+
enumValues: undefined;
|
|
610
|
+
baseColumn: never;
|
|
611
|
+
identity: undefined;
|
|
612
|
+
generated: undefined;
|
|
613
|
+
}, {}, {}>;
|
|
614
|
+
};
|
|
615
|
+
dialect: 'pg';
|
|
616
|
+
}>;
|
|
517
617
|
export declare const githubSqlSchema: {
|
|
518
618
|
juniorGitHubIssues: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
519
619
|
name: "junior_github_issues";
|
|
@@ -780,6 +880,98 @@ export declare const githubSqlSchema: {
|
|
|
780
880
|
};
|
|
781
881
|
dialect: 'pg';
|
|
782
882
|
}>;
|
|
883
|
+
juniorGitHubPullRequestRequesters: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
884
|
+
name: "junior_github_pull_request_requesters";
|
|
885
|
+
schema: undefined;
|
|
886
|
+
columns: {
|
|
887
|
+
repositoryFullName: import("drizzle-orm/pg-core").PgColumn<{
|
|
888
|
+
name: "repository_full_name";
|
|
889
|
+
tableName: "junior_github_pull_request_requesters";
|
|
890
|
+
dataType: "string";
|
|
891
|
+
columnType: "PgText";
|
|
892
|
+
data: string;
|
|
893
|
+
driverParam: string;
|
|
894
|
+
notNull: true;
|
|
895
|
+
hasDefault: false;
|
|
896
|
+
isPrimaryKey: false;
|
|
897
|
+
isAutoincrement: false;
|
|
898
|
+
hasRuntimeDefault: false;
|
|
899
|
+
enumValues: [string, ...string[]];
|
|
900
|
+
baseColumn: never;
|
|
901
|
+
identity: undefined;
|
|
902
|
+
generated: undefined;
|
|
903
|
+
}, {}, {}>;
|
|
904
|
+
number: import("drizzle-orm/pg-core").PgColumn<{
|
|
905
|
+
name: "number";
|
|
906
|
+
tableName: "junior_github_pull_request_requesters";
|
|
907
|
+
dataType: "number";
|
|
908
|
+
columnType: "PgInteger";
|
|
909
|
+
data: number;
|
|
910
|
+
driverParam: string | number;
|
|
911
|
+
notNull: true;
|
|
912
|
+
hasDefault: false;
|
|
913
|
+
isPrimaryKey: false;
|
|
914
|
+
isAutoincrement: false;
|
|
915
|
+
hasRuntimeDefault: false;
|
|
916
|
+
enumValues: undefined;
|
|
917
|
+
baseColumn: never;
|
|
918
|
+
identity: undefined;
|
|
919
|
+
generated: undefined;
|
|
920
|
+
}, {}, {}>;
|
|
921
|
+
identityId: import("drizzle-orm/pg-core").PgColumn<{
|
|
922
|
+
name: "identity_id";
|
|
923
|
+
tableName: "junior_github_pull_request_requesters";
|
|
924
|
+
dataType: "string";
|
|
925
|
+
columnType: "PgText";
|
|
926
|
+
data: string;
|
|
927
|
+
driverParam: string;
|
|
928
|
+
notNull: true;
|
|
929
|
+
hasDefault: false;
|
|
930
|
+
isPrimaryKey: false;
|
|
931
|
+
isAutoincrement: false;
|
|
932
|
+
hasRuntimeDefault: false;
|
|
933
|
+
enumValues: [string, ...string[]];
|
|
934
|
+
baseColumn: never;
|
|
935
|
+
identity: undefined;
|
|
936
|
+
generated: undefined;
|
|
937
|
+
}, {}, {}>;
|
|
938
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
939
|
+
name: "created_at";
|
|
940
|
+
tableName: "junior_github_pull_request_requesters";
|
|
941
|
+
dataType: "date";
|
|
942
|
+
columnType: "PgTimestamp";
|
|
943
|
+
data: Date;
|
|
944
|
+
driverParam: string;
|
|
945
|
+
notNull: true;
|
|
946
|
+
hasDefault: false;
|
|
947
|
+
isPrimaryKey: false;
|
|
948
|
+
isAutoincrement: false;
|
|
949
|
+
hasRuntimeDefault: false;
|
|
950
|
+
enumValues: undefined;
|
|
951
|
+
baseColumn: never;
|
|
952
|
+
identity: undefined;
|
|
953
|
+
generated: undefined;
|
|
954
|
+
}, {}, {}>;
|
|
955
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
956
|
+
name: "updated_at";
|
|
957
|
+
tableName: "junior_github_pull_request_requesters";
|
|
958
|
+
dataType: "date";
|
|
959
|
+
columnType: "PgTimestamp";
|
|
960
|
+
data: Date;
|
|
961
|
+
driverParam: string;
|
|
962
|
+
notNull: true;
|
|
963
|
+
hasDefault: false;
|
|
964
|
+
isPrimaryKey: false;
|
|
965
|
+
isAutoincrement: false;
|
|
966
|
+
hasRuntimeDefault: false;
|
|
967
|
+
enumValues: undefined;
|
|
968
|
+
baseColumn: never;
|
|
969
|
+
identity: undefined;
|
|
970
|
+
generated: undefined;
|
|
971
|
+
}, {}, {}>;
|
|
972
|
+
};
|
|
973
|
+
dialect: 'pg';
|
|
974
|
+
}>;
|
|
783
975
|
juniorGitHubPullRequests: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
784
976
|
name: "junior_github_pull_requests";
|
|
785
977
|
schema: undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type EventMatchFields } from "@sentry/junior-plugin-api";
|
|
2
|
+
/**
|
|
3
|
+
* Filters on who wrote a GitHub comment or review. Issue comments, pull
|
|
4
|
+
* request comments, reviews, and inline review comments set them, so the
|
|
5
|
+
* issue, pull request, and repository resource types share one definition.
|
|
6
|
+
*/
|
|
7
|
+
export declare function gitHubCommentMatchFields(events: readonly string[]): EventMatchFields;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { type SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
2
|
export declare const GITHUB_DEPLOYMENT_EVENTS: readonly ["deployment.created", "deployment.queued", "deployment.pending", "deployment.in_progress", "deployment.succeeded", "deployment.failed", "deployment.error"];
|
|
3
3
|
export declare const GITHUB_DEPLOYMENT_SUGGESTED_EVENTS: string[];
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Trusted deployment values that watches and event automations can match.
|
|
6
|
+
* Every deployment event sets them; the repository resource type also has
|
|
7
|
+
* events that do not.
|
|
8
|
+
*/
|
|
5
9
|
export declare const GITHUB_DEPLOYMENT_MATCH_FIELDS: Record<string, {
|
|
6
10
|
kind: "boolean" | "number" | "string";
|
|
7
11
|
description: string;
|
|
8
12
|
enum?: string[] | undefined;
|
|
13
|
+
list?: true | undefined;
|
|
14
|
+
events?: string[] | undefined;
|
|
9
15
|
}>;
|
|
10
16
|
/** The identifier shape that `gitHubDeploymentSourceResource` builds. */
|
|
11
17
|
export declare const GITHUB_DEPLOYMENT_SOURCE_IDENTIFIER: {
|
|
@@ -18,8 +24,13 @@ export declare function gitHubDeploymentSourceResource(input: {
|
|
|
18
24
|
environment?: string;
|
|
19
25
|
repo: string;
|
|
20
26
|
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
21
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Describe a deployment source that a conversation can watch.
|
|
29
|
+
* Return undefined when the host cannot create Watches.
|
|
30
|
+
*/
|
|
22
31
|
export declare function gitHubDeploymentSourceSubscribable(input: {
|
|
32
|
+
/** `ctx.events.canSubscribe` from the tool context. */
|
|
33
|
+
canSubscribe: boolean;
|
|
23
34
|
commitSha: string;
|
|
24
35
|
environment?: string;
|
|
25
36
|
repo: string;
|
package/dist/events/issue.d.ts
CHANGED
|
@@ -2,13 +2,16 @@ import { type SubscribableResource } from "@sentry/junior-plugin-api";
|
|
|
2
2
|
export declare const GITHUB_ISSUE_EVENTS: string[];
|
|
3
3
|
export declare const GITHUB_ISSUE_SUGGESTED_EVENTS: string[];
|
|
4
4
|
/**
|
|
5
|
-
* Exact values GitHub sets on issue
|
|
6
|
-
*
|
|
5
|
+
* Exact values GitHub sets on issue event data. Every issue event sets the
|
|
6
|
+
* repository and issue number. Only `issue.comment.created` sets the comment
|
|
7
|
+
* filters, so a trigger with them cannot select other events.
|
|
7
8
|
*/
|
|
8
|
-
export declare const
|
|
9
|
+
export declare const GITHUB_ISSUE_MATCH_FIELDS: Record<string, {
|
|
9
10
|
kind: "boolean" | "number" | "string";
|
|
10
11
|
description: string;
|
|
11
12
|
enum?: string[] | undefined;
|
|
13
|
+
list?: true | undefined;
|
|
14
|
+
events?: string[] | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
/** The identifier shape that `gitHubIssueResource` builds. */
|
|
14
17
|
export declare const GITHUB_ISSUE_IDENTIFIER: {
|
|
@@ -20,8 +23,13 @@ export declare function gitHubIssueResource(input: {
|
|
|
20
23
|
number: number;
|
|
21
24
|
repo: string;
|
|
22
25
|
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
23
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Describe an issue as a resource that a conversation can watch.
|
|
28
|
+
* Return undefined when the host cannot create Watches.
|
|
29
|
+
*/
|
|
24
30
|
export declare function gitHubIssueSubscribable(input: {
|
|
31
|
+
/** `ctx.events.canSubscribe` from the tool context. */
|
|
32
|
+
canSubscribe: boolean;
|
|
25
33
|
number: number;
|
|
26
34
|
repo: string;
|
|
27
35
|
}): SubscribableResource | undefined;
|
|
@@ -22,11 +22,19 @@ export declare function gitHubPullRequestCreateWatch(config: GitHubPullRequestSu
|
|
|
22
22
|
intent: string;
|
|
23
23
|
};
|
|
24
24
|
export declare const GITHUB_PULL_REQUEST_SUGGESTED_EVENTS: readonly ["pull_request.checks.failed", "pull_request.comment.created", "pull_request.ready_for_review", "pull_request.review.changes_requested", "pull_request.review.commented", "pull_request.review_comment.created", "pull_request.merged", "pull_request.closed_unmerged"];
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Exact values GitHub may set on pull request event data. Missing keys do not
|
|
27
|
+
* match. The opener and author values load in
|
|
28
|
+
* `webhooks/pull-request-match-data.ts` for every pull request event. The
|
|
29
|
+
* pull request comment webhook has no head branch. A check suite result that
|
|
30
|
+
* GitHub links to no pull request has no `pullRequest`.
|
|
31
|
+
*/
|
|
26
32
|
export declare const GITHUB_PULL_REQUEST_MATCH_FIELDS: Record<string, {
|
|
27
33
|
kind: "boolean" | "number" | "string";
|
|
28
34
|
description: string;
|
|
29
35
|
enum?: string[] | undefined;
|
|
36
|
+
list?: true | undefined;
|
|
37
|
+
events?: string[] | undefined;
|
|
30
38
|
}>;
|
|
31
39
|
/** The identifier shape that `gitHubPullRequestResource` builds. */
|
|
32
40
|
export declare const GITHUB_PULL_REQUEST_IDENTIFIER: {
|
|
@@ -38,8 +46,13 @@ export declare function gitHubPullRequestResource(input: {
|
|
|
38
46
|
number: number;
|
|
39
47
|
repo: string;
|
|
40
48
|
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
41
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Describe a pull request as a resource that a conversation can watch.
|
|
51
|
+
* Return undefined when the host cannot create Watches.
|
|
52
|
+
*/
|
|
42
53
|
export declare function gitHubPullRequestSubscribable(input: {
|
|
54
|
+
/** `ctx.events.canSubscribe` from the tool context. */
|
|
55
|
+
canSubscribe: boolean;
|
|
43
56
|
number: number;
|
|
44
57
|
repo: string;
|
|
45
58
|
/** Events already covered by a forced subscription; omit them from suggestions. */
|
package/dist/events/release.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SubscribableResource } from "@sentry/junior-plugin-api";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
export declare const GITHUB_RELEASE_EVENTS: readonly ["release.published"];
|
|
4
|
+
/**
|
|
5
|
+
* `tag` in event data: the trimmed tag with ASCII letters in lowercase. The
|
|
6
|
+
* release-source identifier has the URI-encoded tag, and the plugin
|
|
7
|
+
* lowercases identifiers. Encoding turns other characters into `%XX`
|
|
8
|
+
* escapes, so only ASCII letters change case there. This form is the same
|
|
9
|
+
* text, so `release/1.0` is not `release%2f1.0`, and `Ü` stays `Ü`. To turn
|
|
10
|
+
* an identifier into a `tag` filter, decode its tag part.
|
|
11
|
+
*/
|
|
12
|
+
export declare const gitHubReleaseTagDataSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
13
|
+
/** Exact values that every release event sets. */
|
|
14
|
+
export declare const GITHUB_RELEASE_MATCH_FIELDS: Record<string, {
|
|
15
|
+
kind: "boolean" | "number" | "string";
|
|
16
|
+
description: string;
|
|
17
|
+
enum?: string[] | undefined;
|
|
18
|
+
list?: true | undefined;
|
|
19
|
+
events?: string[] | undefined;
|
|
20
|
+
}>;
|
|
3
21
|
export declare const GITHUB_RELEASE_SUGGESTED_EVENTS: string[];
|
|
4
22
|
/** The identifier shape that `gitHubReleaseSourceResource` builds. */
|
|
5
23
|
export declare const GITHUB_RELEASE_SOURCE_IDENTIFIER: {
|
|
@@ -11,8 +29,13 @@ export declare function gitHubReleaseSourceResource(input: {
|
|
|
11
29
|
repo: string;
|
|
12
30
|
tag?: string;
|
|
13
31
|
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
14
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Describe a release source that a conversation can watch.
|
|
34
|
+
* Return undefined when the host cannot create Watches.
|
|
35
|
+
*/
|
|
15
36
|
export declare function gitHubReleaseSourceSubscribable(input: {
|
|
37
|
+
/** `ctx.events.canSubscribe` from the tool context. */
|
|
38
|
+
canSubscribe: boolean;
|
|
16
39
|
repo: string;
|
|
17
40
|
tag?: string;
|
|
18
41
|
}): SubscribableResource | undefined;
|
|
@@ -8,7 +8,16 @@ export declare const GITHUB_REPOSITORY_IDENTIFIER: {
|
|
|
8
8
|
export declare function gitHubRepositoryResource(input: {
|
|
9
9
|
repo: string;
|
|
10
10
|
}): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
|
|
11
|
-
/**
|
|
11
|
+
/** Events that a repository Watch gets: deployments, issues, and pull requests. */
|
|
12
|
+
export declare const GITHUB_REPOSITORY_EVENTS: readonly ["deployment.created", "deployment.queued", "deployment.pending", "deployment.in_progress", "deployment.succeeded", "deployment.failed", "deployment.error", ...string[], "pull_request.checks.failed", "pull_request.checks.recovered", "pull_request.comment.created", "pull_request.opened", "pull_request.ready_for_review", "pull_request.review.approved", "pull_request.review.changes_requested", "pull_request.review.commented", "pull_request.review_comment.created", "pull_request.merged", "pull_request.closed_unmerged"];
|
|
13
|
+
/** Repository events to suggest when a conversation starts a Watch. */
|
|
14
|
+
export declare const GITHUB_REPOSITORY_SUGGESTED_EVENTS: readonly ["issue.opened", "pull_request.opened", ...string[], "pull_request.checks.failed", "pull_request.comment.created", "pull_request.ready_for_review", "pull_request.review.changes_requested", "pull_request.review.commented", "pull_request.review_comment.created", "pull_request.merged", "pull_request.closed_unmerged"];
|
|
15
|
+
/**
|
|
16
|
+
* Describe a repository as a resource that a conversation can watch.
|
|
17
|
+
* Return undefined when the host cannot create Watches.
|
|
18
|
+
*/
|
|
12
19
|
export declare function gitHubRepositorySubscribable(input: {
|
|
20
|
+
/** `ctx.events.canSubscribe` from the tool context. */
|
|
21
|
+
canSubscribe: boolean;
|
|
13
22
|
repo: string;
|
|
14
23
|
}): SubscribableResource | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type EventMatchFields } from "@sentry/junior-plugin-api";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* `repo` in event data: lowercase `owner/repo`. GitHub ignores case in
|
|
5
|
+
* repository names, so tools accept this form.
|
|
6
|
+
*/
|
|
7
|
+
export declare const gitHubRepoDataSchema: z.ZodString;
|
|
8
|
+
/** `commitSha` in event data: the full lowercase commit SHA. */
|
|
9
|
+
export declare const gitHubCommitShaDataSchema: z.ZodString;
|
|
10
|
+
/** Filter on the repository of an event. */
|
|
11
|
+
export declare function gitHubRepoMatchFields(events: readonly string[]): EventMatchFields;
|
|
12
|
+
/** Filter on the commit of an event. */
|
|
13
|
+
export declare function gitHubCommitMatchFields(events: readonly string[]): EventMatchFields;
|