@sentry/junior-github 0.263.0 → 0.265.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.
@@ -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;
@@ -1,16 +1,22 @@
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
- /** Trusted deployment values that watches and event automations can match. */
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: {
12
18
  format: string;
13
- pattern: RegExp;
19
+ pattern: string;
14
20
  };
15
21
  /** Build the stable deployment-source identity shared by tools and webhooks. */
16
22
  export declare function gitHubDeploymentSourceResource(input: {
@@ -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
- /** Describe a deployment source when GitHub webhooks are enabled. */
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;
@@ -2,26 +2,34 @@ 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 comment event data. Missing keys do not
6
- * match, so selectors fail closed on other events.
5
+ * Exact values GitHub sets on issue comment event data. Only
6
+ * `issue.comment.created` sets them, so a trigger with these filters cannot
7
+ * select other events.
7
8
  */
8
9
  export declare const GITHUB_ISSUE_COMMENT_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: {
15
18
  format: string;
16
- pattern: RegExp;
19
+ pattern: string;
17
20
  };
18
21
  /** Build the stable issue identity shared by tools and webhooks. */
19
22
  export declare function gitHubIssueResource(input: {
20
23
  number: number;
21
24
  repo: string;
22
25
  }): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
23
- /** Describe an issue as a resource when webhook subscriptions are enabled. */
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,24 +22,36 @@ 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
- /** Exact values GitHub may set on pull request event data. Missing keys do not match. */
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.
30
+ */
26
31
  export declare const GITHUB_PULL_REQUEST_MATCH_FIELDS: Record<string, {
27
32
  kind: "boolean" | "number" | "string";
28
33
  description: string;
29
34
  enum?: string[] | undefined;
35
+ list?: true | undefined;
36
+ events?: string[] | undefined;
30
37
  }>;
31
38
  /** The identifier shape that `gitHubPullRequestResource` builds. */
32
39
  export declare const GITHUB_PULL_REQUEST_IDENTIFIER: {
33
40
  format: string;
34
- pattern: RegExp;
41
+ pattern: string;
35
42
  };
36
43
  /** Build the stable pull request identity shared by tools and webhooks. */
37
44
  export declare function gitHubPullRequestResource(input: {
38
45
  number: number;
39
46
  repo: string;
40
47
  }): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
41
- /** Describe a pull request as a resource when webhook subscriptions are enabled. */
48
+ /**
49
+ * Describe a pull request as a resource that a conversation can watch.
50
+ * Return undefined when the host cannot create Watches.
51
+ */
42
52
  export declare function gitHubPullRequestSubscribable(input: {
53
+ /** `ctx.events.canSubscribe` from the tool context. */
54
+ canSubscribe: boolean;
43
55
  number: number;
44
56
  repo: string;
45
57
  /** Events already covered by a forced subscription; omit them from suggestions. */
@@ -4,15 +4,20 @@ export declare const GITHUB_RELEASE_SUGGESTED_EVENTS: string[];
4
4
  /** The identifier shape that `gitHubReleaseSourceResource` builds. */
5
5
  export declare const GITHUB_RELEASE_SOURCE_IDENTIFIER: {
6
6
  format: string;
7
- pattern: RegExp;
7
+ pattern: string;
8
8
  };
9
9
  /** Build the stable release-source identity shared by tools and webhooks. */
10
10
  export declare function gitHubReleaseSourceResource(input: {
11
11
  repo: string;
12
12
  tag?: string;
13
13
  }): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
14
- /** Describe a release source when GitHub webhooks are enabled. */
14
+ /**
15
+ * Describe a release source that a conversation can watch.
16
+ * Return undefined when the host cannot create Watches.
17
+ */
15
18
  export declare function gitHubReleaseSourceSubscribable(input: {
19
+ /** `ctx.events.canSubscribe` from the tool context. */
20
+ canSubscribe: boolean;
16
21
  repo: string;
17
22
  tag?: string;
18
23
  }): SubscribableResource | undefined;
@@ -2,13 +2,22 @@ import type { SubscribableResource } from "@sentry/junior-plugin-api";
2
2
  /** The identifier shape that `gitHubRepositoryResource` builds. */
3
3
  export declare const GITHUB_REPOSITORY_IDENTIFIER: {
4
4
  format: string;
5
- pattern: RegExp;
5
+ pattern: string;
6
6
  };
7
7
  /** Build the stable repository identity shared by tools and webhooks. */
8
8
  export declare function gitHubRepositoryResource(input: {
9
9
  repo: string;
10
10
  }): Pick<SubscribableResource, "label" | "namespace" | "identifier">;
11
- /** Describe a repository as a resource when webhook subscriptions are enabled. */
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;