@sentry/junior-github 0.271.0 → 0.272.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.
@@ -90,8 +90,14 @@ function gitHubDeploymentSourceResource(input) {
90
90
  }
91
91
  function gitHubDeploymentSourceSubscribable(input) {
92
92
  if (!input.canSubscribe) return void 0;
93
+ const environment = input.environment?.trim().toLowerCase();
93
94
  return {
94
95
  ...gitHubDeploymentSourceResource(input),
96
+ match: {
97
+ repo: gitHubRepoDataSchema.parse(input.repo),
98
+ commitSha: gitHubCommitShaDataSchema.parse(input.commitSha),
99
+ ...environment ? { environment } : void 0
100
+ },
95
101
  suggestedEvents: GITHUB_DEPLOYMENT_SUGGESTED_EVENTS,
96
102
  supportedEvents: [...GITHUB_DEPLOYMENT_EVENTS],
97
103
  type: "deployment_source"
@@ -163,6 +169,10 @@ function gitHubIssueSubscribable(input) {
163
169
  if (!input.canSubscribe) return void 0;
164
170
  return {
165
171
  ...gitHubIssueResource(input),
172
+ match: {
173
+ repo: gitHubRepoDataSchema.parse(input.repo),
174
+ issue: input.number
175
+ },
166
176
  suggestedEvents: GITHUB_ISSUE_SUGGESTED_EVENTS,
167
177
  supportedEvents: GITHUB_ISSUE_EVENTS,
168
178
  type: "issue"
@@ -311,6 +321,10 @@ function gitHubPullRequestSubscribable(input) {
311
321
  );
312
322
  return {
313
323
  ...gitHubPullRequestResource(input),
324
+ match: {
325
+ repo: gitHubRepoDataSchema.parse(input.repo),
326
+ pullRequest: input.number
327
+ },
314
328
  ...suggestedEvents.length > 0 ? { suggestedEvents: [...suggestedEvents] } : void 0,
315
329
  supportedEvents: [...GITHUB_PULL_REQUEST_EVENTS],
316
330
  type: "pull_request"
@@ -350,8 +364,13 @@ function gitHubReleaseSourceResource(input) {
350
364
  }
351
365
  function gitHubReleaseSourceSubscribable(input) {
352
366
  if (!input.canSubscribe) return void 0;
367
+ const tag = input.tag?.trim();
353
368
  return {
354
369
  ...gitHubReleaseSourceResource(input),
370
+ match: {
371
+ repo: gitHubRepoDataSchema.parse(input.repo),
372
+ ...tag ? { tag: gitHubReleaseTagDataSchema.parse(tag) } : void 0
373
+ },
355
374
  suggestedEvents: GITHUB_RELEASE_SUGGESTED_EVENTS,
356
375
  supportedEvents: [...GITHUB_RELEASE_EVENTS],
357
376
  type: "release_source"
@@ -385,6 +404,7 @@ function gitHubRepositorySubscribable(input) {
385
404
  if (!input.canSubscribe) return void 0;
386
405
  return {
387
406
  ...gitHubRepositoryResource(input),
407
+ match: { repo: gitHubRepoDataSchema.parse(input.repo) },
388
408
  suggestedEvents: [...GITHUB_REPOSITORY_SUGGESTED_EVENTS],
389
409
  supportedEvents: [...GITHUB_REPOSITORY_EVENTS],
390
410
  type: "repository"
@@ -2,7 +2,10 @@
2
2
  * GitHub egress policy and grant selection.
3
3
  *
4
4
  * Owns which GitHub requests Junior may make and which credential grant
5
- * each request needs.
5
+ * each request needs. Junior-owned issue, pull request, review, and push
6
+ * writes never fall back to user OAuth. Merge, fork, branch deletion, REST ref
7
+ * writes, and administration stay unsupported; unknown REST writes and
8
+ * GraphQL mutations are denied.
6
9
  */
7
10
  import { type EgressHookContext, type EgressResponseHookContext } from "@sentry/junior-plugin-api";
8
11
  import { type GitHubGrant } from "./credential-support.js";
package/dist/index.js CHANGED
@@ -59,7 +59,7 @@ import {
59
59
  readGrantPermissions,
60
60
  requireEnv,
61
61
  resolveUserAccount
62
- } from "./chunk-MUWR6X24.js";
62
+ } from "./chunk-CSMMYLAS.js";
63
63
 
64
64
  // src/tool-support/attribution.ts
65
65
  var GITHUB_REQUEST_ATTRIBUTION_START = "<!-- junior-request-attribution:start -->";
@@ -4130,7 +4130,7 @@ async function syncOne(args, target) {
4130
4130
  if (ready) {
4131
4131
  await items.upsert({
4132
4132
  assigneeIdentityIds: [opener.identityId],
4133
- body: `**${state.title}** is approved, and GitHub says that it can merge. Merge it, or say why not: ${state.url}`,
4133
+ body: `**${state.title}** is approved, and GitHub says that it can merge: ${state.url}`,
4134
4134
  dedupeKey,
4135
4135
  subject: { id: state.url, title: name, url: state.url },
4136
4136
  title: `Ready to merge: ${name}`
package/dist/testing.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeGitHubEvents
3
- } from "./chunk-MUWR6X24.js";
3
+ } from "./chunk-CSMMYLAS.js";
4
4
  export {
5
5
  normalizeGitHubEvents
6
6
  };
@@ -64,6 +64,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
64
64
  subscribable?: {
65
65
  identifier: string;
66
66
  label: string;
67
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
67
68
  namespace: string;
68
69
  suggestedEvents?: string[] | undefined;
69
70
  supportedEvents: string[];
@@ -130,6 +131,7 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
130
131
  subscribable?: {
131
132
  identifier: string;
132
133
  label: string;
134
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
133
135
  namespace: string;
134
136
  suggestedEvents?: string[] | undefined;
135
137
  supportedEvents: string[];
@@ -68,6 +68,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
68
68
  subscribable?: {
69
69
  identifier: string;
70
70
  label: string;
71
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
71
72
  namespace: string;
72
73
  suggestedEvents?: string[] | undefined;
73
74
  supportedEvents: string[];
@@ -138,6 +139,7 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
138
139
  subscribable?: {
139
140
  identifier: string;
140
141
  label: string;
142
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
141
143
  namespace: string;
142
144
  suggestedEvents?: string[] | undefined;
143
145
  supportedEvents: string[];
@@ -90,6 +90,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
90
90
  subscribable?: {
91
91
  identifier: string;
92
92
  label: string;
93
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
93
94
  namespace: string;
94
95
  suggestedEvents?: string[] | undefined;
95
96
  supportedEvents: string[];
@@ -177,6 +178,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
177
178
  subscribable?: {
178
179
  identifier: string;
179
180
  label: string;
181
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
180
182
  namespace: string;
181
183
  suggestedEvents?: string[] | undefined;
182
184
  supportedEvents: string[];
@@ -73,6 +73,7 @@ export declare function createGitHubGetPullRequestTool(ctx: {
73
73
  subscribable?: {
74
74
  identifier: string;
75
75
  label: string;
76
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
76
77
  namespace: string;
77
78
  suggestedEvents?: string[] | undefined;
78
79
  supportedEvents: string[];
@@ -146,6 +147,7 @@ export declare function createGitHubGetPullRequestTool(ctx: {
146
147
  subscribable?: {
147
148
  identifier: string;
148
149
  label: string;
150
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
149
151
  namespace: string;
150
152
  suggestedEvents?: string[] | undefined;
151
153
  supportedEvents: string[];
@@ -78,6 +78,7 @@ export declare function createGitHubGetReleaseTool(ctx: {
78
78
  subscribable?: {
79
79
  identifier: string;
80
80
  label: string;
81
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
81
82
  namespace: string;
82
83
  suggestedEvents?: string[] | undefined;
83
84
  supportedEvents: string[];
@@ -155,6 +156,7 @@ export declare function createGitHubGetReleaseTool(ctx: {
155
156
  subscribable?: {
156
157
  identifier: string;
157
158
  label: string;
159
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
158
160
  namespace: string;
159
161
  suggestedEvents?: string[] | undefined;
160
162
  supportedEvents: string[];
@@ -69,6 +69,7 @@ export declare function createGitHubGetRepositoryTool(ctx: {
69
69
  subscribable?: {
70
70
  identifier: string;
71
71
  label: string;
72
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
72
73
  namespace: string;
73
74
  suggestedEvents?: string[] | undefined;
74
75
  supportedEvents: string[];
@@ -138,6 +139,7 @@ export declare function createGitHubGetRepositoryTool(ctx: {
138
139
  subscribable?: {
139
140
  identifier: string;
140
141
  label: string;
142
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
141
143
  namespace: string;
142
144
  suggestedEvents?: string[] | undefined;
143
145
  supportedEvents: string[];
@@ -90,6 +90,7 @@ export declare function createGitHubUpdateIssueTool(ctx: {
90
90
  subscribable?: {
91
91
  identifier: string;
92
92
  label: string;
93
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
93
94
  namespace: string;
94
95
  suggestedEvents?: string[] | undefined;
95
96
  supportedEvents: string[];
@@ -159,6 +160,7 @@ export declare function createGitHubUpdateIssueTool(ctx: {
159
160
  subscribable?: {
160
161
  identifier: string;
161
162
  label: string;
163
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
162
164
  namespace: string;
163
165
  suggestedEvents?: string[] | undefined;
164
166
  supportedEvents: string[];
@@ -95,6 +95,7 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
95
95
  subscribable?: {
96
96
  identifier: string;
97
97
  label: string;
98
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
98
99
  namespace: string;
99
100
  suggestedEvents?: string[] | undefined;
100
101
  supportedEvents: string[];
@@ -166,6 +167,7 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
166
167
  subscribable?: {
167
168
  identifier: string;
168
169
  label: string;
170
+ match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
169
171
  namespace: string;
170
172
  suggestedEvents?: string[] | undefined;
171
173
  supportedEvents: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.271.0",
3
+ "version": "0.272.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,7 +32,7 @@
32
32
  "drizzle-orm": "^0.45.2",
33
33
  "marked": "^18.1.2",
34
34
  "zod": "^4.5.4",
35
- "@sentry/junior-plugin-api": "0.271.0"
35
+ "@sentry/junior-plugin-api": "0.272.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@oxlint/plugins": "1.79.0",