@sentry/junior-github 0.275.0 → 0.276.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-EALXNZGU.js → chunk-PCWKGWHE.js} +15 -15
- package/dist/events/resource-url.d.ts +5 -0
- package/dist/index.js +586 -437
- package/dist/testing.js +1 -1
- package/dist/tools/clone-repository.d.ts +1 -1
- package/dist/tools/create-issue.d.ts +4 -4
- package/dist/tools/create-pull-request.d.ts +12 -4
- package/dist/tools/get-deployment.d.ts +19 -19
- package/dist/tools/get-pull-request.d.ts +6 -6
- package/dist/tools/get-release.d.ts +14 -14
- package/dist/tools/get-repository.d.ts +8 -8
- package/dist/tools/resolve-pull-request-review-thread.d.ts +3 -3
- package/dist/tools/stack-pull-request.d.ts +42 -0
- package/dist/tools/submit-pull-request-review.d.ts +4 -4
- package/dist/tools/update-issue.d.ts +4 -4
- package/dist/tools/update-pull-request-feedback.d.ts +6 -6
- package/dist/tools/update-pull-request.d.ts +4 -4
- package/package.json +2 -2
- package/skills/github-code/references/api-surface.md +1 -1
- package/skills/github-code/references/workflow.md +5 -3
package/dist/testing.js
CHANGED
|
@@ -7,7 +7,7 @@ export declare function createGitHubCloneRepositoryTool(ctx: {
|
|
|
7
7
|
}): import("@sentry/junior-plugin-api").PluginToolDefinition<{
|
|
8
8
|
repo: string;
|
|
9
9
|
directory?: string | undefined;
|
|
10
|
-
|
|
10
|
+
allow_ad_hoc?: boolean | undefined;
|
|
11
11
|
}, {
|
|
12
12
|
objectAnnotations?: {
|
|
13
13
|
kind: "object";
|
|
@@ -66,8 +66,8 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
66
66
|
label: string;
|
|
67
67
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
68
68
|
namespace: string;
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
suggested_events?: string[] | undefined;
|
|
70
|
+
supported_events: string[];
|
|
71
71
|
type: string;
|
|
72
72
|
} | undefined;
|
|
73
73
|
url: string;
|
|
@@ -133,8 +133,8 @@ export declare function createGitHubIssueTool(ctx: ToolRegistrationHookContext):
|
|
|
133
133
|
label: string;
|
|
134
134
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
135
135
|
namespace: string;
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
suggested_events?: string[] | undefined;
|
|
137
|
+
supported_events: string[];
|
|
138
138
|
type: string;
|
|
139
139
|
} | undefined;
|
|
140
140
|
url: string;
|
|
@@ -65,13 +65,17 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
65
65
|
} | undefined;
|
|
66
66
|
number: number;
|
|
67
67
|
url: string;
|
|
68
|
+
stack?: {
|
|
69
|
+
number: number;
|
|
70
|
+
pull_requests: number[];
|
|
71
|
+
} | undefined;
|
|
68
72
|
subscribable?: {
|
|
69
73
|
identifier: string;
|
|
70
74
|
label: string;
|
|
71
75
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
72
76
|
namespace: string;
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
suggested_events?: string[] | undefined;
|
|
78
|
+
supported_events: string[];
|
|
75
79
|
type: string;
|
|
76
80
|
} | undefined;
|
|
77
81
|
subscription?: {
|
|
@@ -136,13 +140,17 @@ export declare function createGitHubPullRequestTool(ctx: ToolRegistrationHookCon
|
|
|
136
140
|
} | undefined;
|
|
137
141
|
number: number;
|
|
138
142
|
url: string;
|
|
143
|
+
stack?: {
|
|
144
|
+
number: number;
|
|
145
|
+
pull_requests: number[];
|
|
146
|
+
} | undefined;
|
|
139
147
|
subscribable?: {
|
|
140
148
|
identifier: string;
|
|
141
149
|
label: string;
|
|
142
150
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
143
151
|
namespace: string;
|
|
144
|
-
|
|
145
|
-
|
|
152
|
+
suggested_events?: string[] | undefined;
|
|
153
|
+
supported_events: string[];
|
|
146
154
|
type: string;
|
|
147
155
|
} | undefined;
|
|
148
156
|
subscription?: {
|
|
@@ -7,7 +7,7 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
7
7
|
};
|
|
8
8
|
}): import("@sentry/junior-plugin-api").PluginToolDefinition<{
|
|
9
9
|
repo: string;
|
|
10
|
-
|
|
10
|
+
commit_sha: string;
|
|
11
11
|
environment?: string | undefined;
|
|
12
12
|
}, {
|
|
13
13
|
objectAnnotations?: {
|
|
@@ -64,25 +64,25 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
64
64
|
arguments: Record<string, unknown>;
|
|
65
65
|
reason?: string | undefined;
|
|
66
66
|
} | undefined;
|
|
67
|
-
|
|
67
|
+
commit_sha: string;
|
|
68
68
|
deployment: {
|
|
69
|
-
|
|
69
|
+
created_at: string;
|
|
70
70
|
creator: string | null;
|
|
71
71
|
description: string | null;
|
|
72
72
|
environment: string;
|
|
73
73
|
id: number;
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
latest_status: {
|
|
75
|
+
created_at: string;
|
|
76
76
|
creator: string | null;
|
|
77
77
|
description: string | null;
|
|
78
|
-
|
|
78
|
+
environment_url: string | null;
|
|
79
79
|
id: number;
|
|
80
|
-
|
|
80
|
+
log_url: string | null;
|
|
81
81
|
state: string;
|
|
82
82
|
} | null;
|
|
83
83
|
ref: string;
|
|
84
84
|
sha: string;
|
|
85
|
-
|
|
85
|
+
updated_at: string;
|
|
86
86
|
url: string;
|
|
87
87
|
} | null;
|
|
88
88
|
environment: string | null;
|
|
@@ -92,8 +92,8 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
92
92
|
label: string;
|
|
93
93
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
94
94
|
namespace: string;
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
suggested_events?: string[] | undefined;
|
|
96
|
+
supported_events: string[];
|
|
97
97
|
type: string;
|
|
98
98
|
} | undefined;
|
|
99
99
|
target: "getDeployment";
|
|
@@ -152,25 +152,25 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
152
152
|
arguments: Record<string, unknown>;
|
|
153
153
|
reason?: string | undefined;
|
|
154
154
|
} | undefined;
|
|
155
|
-
|
|
155
|
+
commit_sha: string;
|
|
156
156
|
deployment: {
|
|
157
|
-
|
|
157
|
+
created_at: string;
|
|
158
158
|
creator: string | null;
|
|
159
159
|
description: string | null;
|
|
160
160
|
environment: string;
|
|
161
161
|
id: number;
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
latest_status: {
|
|
163
|
+
created_at: string;
|
|
164
164
|
creator: string | null;
|
|
165
165
|
description: string | null;
|
|
166
|
-
|
|
166
|
+
environment_url: string | null;
|
|
167
167
|
id: number;
|
|
168
|
-
|
|
168
|
+
log_url: string | null;
|
|
169
169
|
state: string;
|
|
170
170
|
} | null;
|
|
171
171
|
ref: string;
|
|
172
172
|
sha: string;
|
|
173
|
-
|
|
173
|
+
updated_at: string;
|
|
174
174
|
url: string;
|
|
175
175
|
} | null;
|
|
176
176
|
environment: string | null;
|
|
@@ -180,8 +180,8 @@ export declare function createGitHubGetDeploymentTool(ctx: {
|
|
|
180
180
|
label: string;
|
|
181
181
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
182
182
|
namespace: string;
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
suggested_events?: string[] | undefined;
|
|
184
|
+
supported_events: string[];
|
|
185
185
|
type: string;
|
|
186
186
|
} | undefined;
|
|
187
187
|
target: "getDeployment";
|
|
@@ -66,7 +66,7 @@ export declare function createGitHubGetPullRequestTool(ctx: {
|
|
|
66
66
|
base: string;
|
|
67
67
|
draft: boolean;
|
|
68
68
|
head: string;
|
|
69
|
-
|
|
69
|
+
head_sha: string;
|
|
70
70
|
merged: boolean;
|
|
71
71
|
number: number;
|
|
72
72
|
state: string;
|
|
@@ -75,8 +75,8 @@ export declare function createGitHubGetPullRequestTool(ctx: {
|
|
|
75
75
|
label: string;
|
|
76
76
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
77
77
|
namespace: string;
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
suggested_events?: string[] | undefined;
|
|
79
|
+
supported_events: string[];
|
|
80
80
|
type: string;
|
|
81
81
|
} | undefined;
|
|
82
82
|
title: string;
|
|
@@ -140,7 +140,7 @@ export declare function createGitHubGetPullRequestTool(ctx: {
|
|
|
140
140
|
base: string;
|
|
141
141
|
draft: boolean;
|
|
142
142
|
head: string;
|
|
143
|
-
|
|
143
|
+
head_sha: string;
|
|
144
144
|
merged: boolean;
|
|
145
145
|
number: number;
|
|
146
146
|
state: string;
|
|
@@ -149,8 +149,8 @@ export declare function createGitHubGetPullRequestTool(ctx: {
|
|
|
149
149
|
label: string;
|
|
150
150
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
151
151
|
namespace: string;
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
suggested_events?: string[] | undefined;
|
|
153
|
+
supported_events: string[];
|
|
154
154
|
type: string;
|
|
155
155
|
} | undefined;
|
|
156
156
|
title: string;
|
|
@@ -64,15 +64,15 @@ export declare function createGitHubGetReleaseTool(ctx: {
|
|
|
64
64
|
reason?: string | undefined;
|
|
65
65
|
} | undefined;
|
|
66
66
|
release: {
|
|
67
|
-
|
|
67
|
+
created_at: string;
|
|
68
68
|
draft: boolean;
|
|
69
|
-
|
|
69
|
+
html_url: string;
|
|
70
70
|
id: number;
|
|
71
71
|
name: string | null;
|
|
72
72
|
prerelease: boolean;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
published_at: string | null;
|
|
74
|
+
tag_name: string;
|
|
75
|
+
target_commitish: string;
|
|
76
76
|
} | null;
|
|
77
77
|
repo: string;
|
|
78
78
|
subscribable?: {
|
|
@@ -80,8 +80,8 @@ export declare function createGitHubGetReleaseTool(ctx: {
|
|
|
80
80
|
label: string;
|
|
81
81
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
82
82
|
namespace: string;
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
suggested_events?: string[] | undefined;
|
|
84
|
+
supported_events: string[];
|
|
85
85
|
type: string;
|
|
86
86
|
} | undefined;
|
|
87
87
|
tag: string | null;
|
|
@@ -142,15 +142,15 @@ export declare function createGitHubGetReleaseTool(ctx: {
|
|
|
142
142
|
reason?: string | undefined;
|
|
143
143
|
} | undefined;
|
|
144
144
|
release: {
|
|
145
|
-
|
|
145
|
+
created_at: string;
|
|
146
146
|
draft: boolean;
|
|
147
|
-
|
|
147
|
+
html_url: string;
|
|
148
148
|
id: number;
|
|
149
149
|
name: string | null;
|
|
150
150
|
prerelease: boolean;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
published_at: string | null;
|
|
152
|
+
tag_name: string;
|
|
153
|
+
target_commitish: string;
|
|
154
154
|
} | null;
|
|
155
155
|
repo: string;
|
|
156
156
|
subscribable?: {
|
|
@@ -158,8 +158,8 @@ export declare function createGitHubGetReleaseTool(ctx: {
|
|
|
158
158
|
label: string;
|
|
159
159
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
160
160
|
namespace: string;
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
suggested_events?: string[] | undefined;
|
|
162
|
+
supported_events: string[];
|
|
163
163
|
type: string;
|
|
164
164
|
} | undefined;
|
|
165
165
|
tag: string | null;
|
|
@@ -62,17 +62,17 @@ export declare function createGitHubGetRepositoryTool(ctx: {
|
|
|
62
62
|
arguments: Record<string, unknown>;
|
|
63
63
|
reason?: string | undefined;
|
|
64
64
|
} | undefined;
|
|
65
|
-
|
|
65
|
+
default_branch: string;
|
|
66
66
|
description: string | null;
|
|
67
|
-
|
|
67
|
+
full_name: string;
|
|
68
68
|
private: boolean;
|
|
69
69
|
subscribable?: {
|
|
70
70
|
identifier: string;
|
|
71
71
|
label: string;
|
|
72
72
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
73
73
|
namespace: string;
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
suggested_events?: string[] | undefined;
|
|
75
|
+
supported_events: string[];
|
|
76
76
|
type: string;
|
|
77
77
|
} | undefined;
|
|
78
78
|
url: string;
|
|
@@ -132,17 +132,17 @@ export declare function createGitHubGetRepositoryTool(ctx: {
|
|
|
132
132
|
arguments: Record<string, unknown>;
|
|
133
133
|
reason?: string | undefined;
|
|
134
134
|
} | undefined;
|
|
135
|
-
|
|
135
|
+
default_branch: string;
|
|
136
136
|
description: string | null;
|
|
137
|
-
|
|
137
|
+
full_name: string;
|
|
138
138
|
private: boolean;
|
|
139
139
|
subscribable?: {
|
|
140
140
|
identifier: string;
|
|
141
141
|
label: string;
|
|
142
142
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
143
143
|
namespace: string;
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
suggested_events?: string[] | undefined;
|
|
145
|
+
supported_events: string[];
|
|
146
146
|
type: string;
|
|
147
147
|
} | undefined;
|
|
148
148
|
url: string;
|
|
@@ -4,7 +4,7 @@ export declare function createGitHubResolvePullRequestReviewThreadTool(ctx: {
|
|
|
4
4
|
egress: PluginEgress;
|
|
5
5
|
}, botEmail: string | undefined): import("@sentry/junior-plugin-api").PluginToolDefinition<{
|
|
6
6
|
repo: string;
|
|
7
|
-
|
|
7
|
+
thread_id: string;
|
|
8
8
|
}, {
|
|
9
9
|
[x: string]: unknown;
|
|
10
10
|
objectAnnotations?: {
|
|
@@ -64,7 +64,7 @@ export declare function createGitHubResolvePullRequestReviewThreadTool(ctx: {
|
|
|
64
64
|
target: "resolvePullRequestReviewThread";
|
|
65
65
|
repo: string;
|
|
66
66
|
number: number;
|
|
67
|
-
|
|
67
|
+
thread_id: string;
|
|
68
68
|
resolved: boolean;
|
|
69
69
|
}, {
|
|
70
70
|
[x: string]: unknown;
|
|
@@ -125,6 +125,6 @@ export declare function createGitHubResolvePullRequestReviewThreadTool(ctx: {
|
|
|
125
125
|
target: "resolvePullRequestReviewThread";
|
|
126
126
|
repo: string;
|
|
127
127
|
number: number;
|
|
128
|
-
|
|
128
|
+
thread_id: string;
|
|
129
129
|
resolved: boolean;
|
|
130
130
|
}>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Link a new pull request into a GitHub stack.
|
|
3
|
+
*
|
|
4
|
+
* A pull request whose base is the head branch of another open pull request
|
|
5
|
+
* is stacked work. GitHub stacks merge as one group, rebase the next pull
|
|
6
|
+
* request after a merge, and check each pull request against the trunk. So
|
|
7
|
+
* the create tool links the pull request into a stack instead of leaving a
|
|
8
|
+
* chain of base branches.
|
|
9
|
+
*/
|
|
10
|
+
import type { ToolRegistrationHookContext } from "@sentry/junior-plugin-api";
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
/** The fields of a created pull request that decide if it is stacked work. */
|
|
13
|
+
export declare const stackTargetSchema: z.ZodObject<{
|
|
14
|
+
number: z.ZodNumber;
|
|
15
|
+
head: z.ZodObject<{
|
|
16
|
+
repo: z.ZodNullable<z.ZodObject<{
|
|
17
|
+
full_name: z.ZodString;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
base: z.ZodObject<{
|
|
21
|
+
ref: z.ZodString;
|
|
22
|
+
repo: z.ZodObject<{
|
|
23
|
+
default_branch: z.ZodString;
|
|
24
|
+
full_name: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type GitHubStackTarget = z.infer<typeof stackTargetSchema>;
|
|
29
|
+
/** The stack that a created pull request joined. */
|
|
30
|
+
export interface GitHubPullRequestStack {
|
|
31
|
+
number: number;
|
|
32
|
+
pull_requests: number[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Link a created pull request into a GitHub stack when its base is the head
|
|
36
|
+
* branch of another open pull request. Add it to the stack of that pull
|
|
37
|
+
* request when that one is on top, or create a stack from the chain of base
|
|
38
|
+
* branches down to the trunk. Return the stack, or nothing when the pull
|
|
39
|
+
* request is not stacked work or GitHub cannot stack it. Stacking is
|
|
40
|
+
* optional, so failures never fail pull request creation.
|
|
41
|
+
*/
|
|
42
|
+
export declare function stackGitHubPullRequest(ctx: ToolRegistrationHookContext, target: GitHubStackTarget): Promise<GitHubPullRequestStack | undefined>;
|
|
@@ -10,8 +10,8 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
|
|
|
10
10
|
body: string;
|
|
11
11
|
line: number;
|
|
12
12
|
side: "LEFT" | "RIGHT";
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
start_line?: number | undefined;
|
|
14
|
+
start_side?: "LEFT" | "RIGHT" | undefined;
|
|
15
15
|
}[] | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
[x: string]: unknown;
|
|
@@ -72,7 +72,7 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
|
|
|
72
72
|
target: "submitPullRequestReview";
|
|
73
73
|
repo: string;
|
|
74
74
|
number: number;
|
|
75
|
-
|
|
75
|
+
review_id: number;
|
|
76
76
|
state: string;
|
|
77
77
|
url: string;
|
|
78
78
|
}, {
|
|
@@ -134,7 +134,7 @@ export declare function createGitHubSubmitPullRequestReviewTool(egress: PluginEg
|
|
|
134
134
|
target: "submitPullRequestReview";
|
|
135
135
|
repo: string;
|
|
136
136
|
number: number;
|
|
137
|
-
|
|
137
|
+
review_id: number;
|
|
138
138
|
state: string;
|
|
139
139
|
url: string;
|
|
140
140
|
}>;
|
|
@@ -92,8 +92,8 @@ export declare function createGitHubUpdateIssueTool(ctx: {
|
|
|
92
92
|
label: string;
|
|
93
93
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
94
94
|
namespace: string;
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
suggested_events?: string[] | undefined;
|
|
96
|
+
supported_events: string[];
|
|
97
97
|
type: string;
|
|
98
98
|
} | undefined;
|
|
99
99
|
title: string;
|
|
@@ -162,8 +162,8 @@ export declare function createGitHubUpdateIssueTool(ctx: {
|
|
|
162
162
|
label: string;
|
|
163
163
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
164
164
|
namespace: string;
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
suggested_events?: string[] | undefined;
|
|
166
|
+
supported_events: string[];
|
|
167
167
|
type: string;
|
|
168
168
|
} | undefined;
|
|
169
169
|
title: string;
|
|
@@ -29,8 +29,8 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
|
|
|
29
29
|
egress: PluginEgress;
|
|
30
30
|
}, botEmail: string | undefined): import("@sentry/junior-plugin-api").PluginToolDefinition<{
|
|
31
31
|
repo: string;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
comment_kind: "conversation" | "review";
|
|
33
|
+
comment_id: number;
|
|
34
34
|
status: "addressed" | "declined";
|
|
35
35
|
}, {
|
|
36
36
|
[x: string]: unknown;
|
|
@@ -90,9 +90,9 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
|
|
|
90
90
|
} | undefined;
|
|
91
91
|
target: "updatePullRequestFeedback";
|
|
92
92
|
repo: string;
|
|
93
|
-
|
|
93
|
+
comment_id: number;
|
|
94
94
|
status: "addressed" | "declined";
|
|
95
|
-
|
|
95
|
+
reaction_id: number;
|
|
96
96
|
}, {
|
|
97
97
|
[x: string]: unknown;
|
|
98
98
|
objectAnnotations?: {
|
|
@@ -151,8 +151,8 @@ export declare function createGitHubUpdatePullRequestFeedbackTool(ctx: {
|
|
|
151
151
|
} | undefined;
|
|
152
152
|
target: "updatePullRequestFeedback";
|
|
153
153
|
repo: string;
|
|
154
|
-
|
|
154
|
+
comment_id: number;
|
|
155
155
|
status: "addressed" | "declined";
|
|
156
|
-
|
|
156
|
+
reaction_id: number;
|
|
157
157
|
}>;
|
|
158
158
|
export {};
|
|
@@ -97,8 +97,8 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
|
|
|
97
97
|
label: string;
|
|
98
98
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
99
99
|
namespace: string;
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
suggested_events?: string[] | undefined;
|
|
101
|
+
supported_events: string[];
|
|
102
102
|
type: string;
|
|
103
103
|
} | undefined;
|
|
104
104
|
title: string;
|
|
@@ -169,8 +169,8 @@ export declare function createGitHubUpdatePullRequestTool(ctx: {
|
|
|
169
169
|
label: string;
|
|
170
170
|
match?: Record<string, string | number | boolean | (string | number)[]> | undefined;
|
|
171
171
|
namespace: string;
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
suggested_events?: string[] | undefined;
|
|
173
|
+
supported_events: string[];
|
|
174
174
|
type: string;
|
|
175
175
|
} | undefined;
|
|
176
176
|
title: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior-github",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.276.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.
|
|
35
|
+
"@sentry/junior-plugin-api": "0.276.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@oxlint/plugins": "1.79.0",
|
|
@@ -56,7 +56,7 @@ If the user omits `owner/repo`, run `jr-rpc config get github.repo`. Then pass `
|
|
|
56
56
|
- A local commit does not call GitHub. A push uses installation credentials. Workflow changes also need `workflows.write`.
|
|
57
57
|
- Deepen a shallow clone before work that needs old history. Do not force-push to work around missing history.
|
|
58
58
|
- Push `head` and read the default `base` before `github_createPullRequest`.
|
|
59
|
-
- Stacks: open each PR with `github_createPullRequest`, based on the branch below,
|
|
59
|
+
- Stacks: open each PR with `github_createPullRequest`, based on the branch below. When its base is the head of another open PR, the tool links it into a GitHub stack and returns `stack`; do not run `gh stack link` for it. No `stack` means GitHub could not stack it. Without local stack state, run `gh stack checkout STACK_NUMBER` first. Do not pass `--open`.
|
|
60
60
|
- Junior does not support merges, forks, repository administration, REST content or Git database writes, direct PR update or review writes, auto-merge, or GraphQL mutations.
|
|
61
61
|
- Reviews and inline comments use the App bot.
|
|
62
62
|
- PR comments/labels/assignees use issue endpoints; load `github-issues` for those.
|
|
@@ -6,7 +6,7 @@ Open this when making repository edits, not for read-only inspection.
|
|
|
6
6
|
|
|
7
7
|
1. Identify repo, checkout, branches, worktree, package manager, and relevant checks.
|
|
8
8
|
2. Prefer an existing checkout or matching Workspace; otherwise clone with `github_cloneRepository`.
|
|
9
|
-
3. If clone returns a Workspace match error, switch Workspace or pass `
|
|
9
|
+
3. If clone returns a Workspace match error, switch Workspace or pass `allow_ad_hoc=true`.
|
|
10
10
|
4. Shallow clones are for fast inspection. Before rebase, merge-base, blame, or base comparison, fetch/deepen the needed refs. Never force-push around missing history.
|
|
11
11
|
5. For edits, pick the smallest credible validation path. Capture a baseline when a failure may be pre-existing.
|
|
12
12
|
|
|
@@ -37,8 +37,10 @@ Open this when making repository edits, not for read-only inspection.
|
|
|
37
37
|
If the branch has an open PR, check that it can merge. Do this after every push, including fixes for review feedback or failed checks. A conflicted PR gets no new checks. A watched PR gets `pull_request.merge_conflict` only with its next event, so do not wait for it.
|
|
38
38
|
- Run `gh pr view NUMBER --repo owner/repo --json mergeable,baseRefName`.
|
|
39
39
|
- `UNKNOWN`: GitHub is still calculating it. Wait about 5 seconds and check again, up to 3 times. If it stays `UNKNOWN`, report that and continue.
|
|
40
|
-
- `CONFLICTING`: resolve it now. Do not ask first.
|
|
41
|
-
|
|
40
|
+
- `CONFLICTING`: resolve it now. Do not ask first. First check if the PR is in a stack: `gh api 'repos/owner/repo/stacks?pull_request=NUMBER'`.
|
|
41
|
+
- In a stack: a stack merges only with a linear history, so do not merge the base. Run `gh stack checkout NUMBER` and `gh stack rebase`, resolve each conflict, run `gh stack rebase --continue`, run the checks, and `gh stack push`.
|
|
42
|
+
- Not in a stack: GitHub checks mergeability against the PR base (`baseRefName`), which is usually the default branch. Fetch the base and merge `origin/BASE` into the PR branch. Do not rebase. Resolve each conflict so that both the PR change and the base branch change stay intact. Run the checks again and push.
|
|
43
|
+
- Then check mergeability again.
|
|
42
44
|
4. Resolve the actual default branch.
|
|
43
45
|
5. Update an existing PR for the branch with `github_updatePullRequest`, or create with `github_createPullRequest` (`draft: true` only when work, checks, or decisions remain; otherwise ready for review).
|
|
44
46
|
6. PR title matches the current dominant change, same conventional form as commits.
|