@sentry/junior-github 0.107.1 → 0.109.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.
@@ -0,0 +1,275 @@
1
+ {
2
+ "id": "6e0acdc7-db48-4ebf-846e-0589fc32afb5",
3
+ "prevId": "fb7f4132-d92f-4127-be54-23f93c79034b",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_github_issues": {
8
+ "name": "junior_github_issues",
9
+ "schema": "",
10
+ "columns": {
11
+ "issue_id": {
12
+ "name": "issue_id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "repository_id": {
18
+ "name": "repository_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "repository_full_name": {
24
+ "name": "repository_full_name",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "number": {
30
+ "name": "number",
31
+ "type": "integer",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "state": {
36
+ "name": "state",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "state_reason": {
42
+ "name": "state_reason",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "opened_at": {
48
+ "name": "opened_at",
49
+ "type": "timestamp with time zone",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "closed_at": {
54
+ "name": "closed_at",
55
+ "type": "timestamp with time zone",
56
+ "primaryKey": false,
57
+ "notNull": false
58
+ },
59
+ "updated_at": {
60
+ "name": "updated_at",
61
+ "type": "timestamp with time zone",
62
+ "primaryKey": false,
63
+ "notNull": true
64
+ }
65
+ },
66
+ "indexes": {
67
+ "junior_github_issues_opened_at_idx": {
68
+ "name": "junior_github_issues_opened_at_idx",
69
+ "columns": [
70
+ {
71
+ "expression": "opened_at",
72
+ "isExpression": false,
73
+ "asc": true,
74
+ "nulls": "last"
75
+ }
76
+ ],
77
+ "isUnique": false,
78
+ "concurrently": false,
79
+ "method": "btree",
80
+ "with": {}
81
+ },
82
+ "junior_github_issues_closed_at_idx": {
83
+ "name": "junior_github_issues_closed_at_idx",
84
+ "columns": [
85
+ {
86
+ "expression": "closed_at",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": false,
93
+ "concurrently": false,
94
+ "method": "btree",
95
+ "with": {}
96
+ },
97
+ "junior_github_issues_open_idx": {
98
+ "name": "junior_github_issues_open_idx",
99
+ "columns": [
100
+ {
101
+ "expression": "issue_id",
102
+ "isExpression": false,
103
+ "asc": true,
104
+ "nulls": "last"
105
+ }
106
+ ],
107
+ "isUnique": false,
108
+ "where": "\"junior_github_issues\".\"state\" = 'open'",
109
+ "concurrently": false,
110
+ "method": "btree",
111
+ "with": {}
112
+ }
113
+ },
114
+ "foreignKeys": {},
115
+ "compositePrimaryKeys": {},
116
+ "uniqueConstraints": {},
117
+ "policies": {},
118
+ "checkConstraints": {},
119
+ "isRLSEnabled": false
120
+ },
121
+ "public.junior_github_pull_requests": {
122
+ "name": "junior_github_pull_requests",
123
+ "schema": "",
124
+ "columns": {
125
+ "pull_request_id": {
126
+ "name": "pull_request_id",
127
+ "type": "text",
128
+ "primaryKey": true,
129
+ "notNull": true
130
+ },
131
+ "repository_id": {
132
+ "name": "repository_id",
133
+ "type": "text",
134
+ "primaryKey": false,
135
+ "notNull": true
136
+ },
137
+ "repository_full_name": {
138
+ "name": "repository_full_name",
139
+ "type": "text",
140
+ "primaryKey": false,
141
+ "notNull": true
142
+ },
143
+ "number": {
144
+ "name": "number",
145
+ "type": "integer",
146
+ "primaryKey": false,
147
+ "notNull": true
148
+ },
149
+ "state": {
150
+ "name": "state",
151
+ "type": "text",
152
+ "primaryKey": false,
153
+ "notNull": true
154
+ },
155
+ "commit_composition": {
156
+ "name": "commit_composition",
157
+ "type": "text",
158
+ "primaryKey": false,
159
+ "notNull": false
160
+ },
161
+ "conversation_ids": {
162
+ "name": "conversation_ids",
163
+ "type": "text[]",
164
+ "primaryKey": false,
165
+ "notNull": true,
166
+ "default": "ARRAY[]::text[]"
167
+ },
168
+ "opened_at": {
169
+ "name": "opened_at",
170
+ "type": "timestamp with time zone",
171
+ "primaryKey": false,
172
+ "notNull": true
173
+ },
174
+ "merged_at": {
175
+ "name": "merged_at",
176
+ "type": "timestamp with time zone",
177
+ "primaryKey": false,
178
+ "notNull": false
179
+ },
180
+ "closed_at": {
181
+ "name": "closed_at",
182
+ "type": "timestamp with time zone",
183
+ "primaryKey": false,
184
+ "notNull": false
185
+ },
186
+ "updated_at": {
187
+ "name": "updated_at",
188
+ "type": "timestamp with time zone",
189
+ "primaryKey": false,
190
+ "notNull": true
191
+ }
192
+ },
193
+ "indexes": {
194
+ "junior_github_pull_requests_opened_at_idx": {
195
+ "name": "junior_github_pull_requests_opened_at_idx",
196
+ "columns": [
197
+ {
198
+ "expression": "opened_at",
199
+ "isExpression": false,
200
+ "asc": true,
201
+ "nulls": "last"
202
+ }
203
+ ],
204
+ "isUnique": false,
205
+ "concurrently": false,
206
+ "method": "btree",
207
+ "with": {}
208
+ },
209
+ "junior_github_pull_requests_merged_at_idx": {
210
+ "name": "junior_github_pull_requests_merged_at_idx",
211
+ "columns": [
212
+ {
213
+ "expression": "merged_at",
214
+ "isExpression": false,
215
+ "asc": true,
216
+ "nulls": "last"
217
+ }
218
+ ],
219
+ "isUnique": false,
220
+ "concurrently": false,
221
+ "method": "btree",
222
+ "with": {}
223
+ },
224
+ "junior_github_pull_requests_closed_at_idx": {
225
+ "name": "junior_github_pull_requests_closed_at_idx",
226
+ "columns": [
227
+ {
228
+ "expression": "closed_at",
229
+ "isExpression": false,
230
+ "asc": true,
231
+ "nulls": "last"
232
+ }
233
+ ],
234
+ "isUnique": false,
235
+ "concurrently": false,
236
+ "method": "btree",
237
+ "with": {}
238
+ },
239
+ "junior_github_pull_requests_open_idx": {
240
+ "name": "junior_github_pull_requests_open_idx",
241
+ "columns": [
242
+ {
243
+ "expression": "pull_request_id",
244
+ "isExpression": false,
245
+ "asc": true,
246
+ "nulls": "last"
247
+ }
248
+ ],
249
+ "isUnique": false,
250
+ "where": "\"junior_github_pull_requests\".\"state\" = 'open'",
251
+ "concurrently": false,
252
+ "method": "btree",
253
+ "with": {}
254
+ }
255
+ },
256
+ "foreignKeys": {},
257
+ "compositePrimaryKeys": {},
258
+ "uniqueConstraints": {},
259
+ "policies": {},
260
+ "checkConstraints": {},
261
+ "isRLSEnabled": false
262
+ }
263
+ },
264
+ "enums": {},
265
+ "schemas": {},
266
+ "sequences": {},
267
+ "roles": {},
268
+ "policies": {},
269
+ "views": {},
270
+ "_meta": {
271
+ "columns": {},
272
+ "schemas": {},
273
+ "tables": {}
274
+ }
275
+ }
@@ -8,6 +8,34 @@
8
8
  "when": 1784743423488,
9
9
  "tag": "0000_pull_request_outcomes",
10
10
  "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1784760512145,
16
+ "tag": "0001_issue_outcomes",
17
+ "breakpoints": true
18
+ },
19
+ {
20
+ "idx": 2,
21
+ "version": "7",
22
+ "when": 1784761404746,
23
+ "tag": "0002_pull_request_commit_composition",
24
+ "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "7",
29
+ "when": 1784762053015,
30
+ "tag": "0003_pull_request_conversations",
31
+ "breakpoints": true
32
+ },
33
+ {
34
+ "idx": 4,
35
+ "version": "7",
36
+ "when": 1784774242129,
37
+ "tag": "0004_marvelous_toad_men",
38
+ "breakpoints": true
11
39
  }
12
40
  ]
13
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.107.1",
3
+ "version": "0.109.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,7 +31,7 @@
31
31
  "@sinclair/typebox": "^0.34.49",
32
32
  "drizzle-orm": "^0.45.2",
33
33
  "zod": "^4.4.3",
34
- "@sentry/junior-plugin-api": "0.107.1"
34
+ "@sentry/junior-plugin-api": "0.109.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^25.9.1",
@@ -13,10 +13,10 @@
13
13
 
14
14
  - **Adopted:** preserve the upstream one-file-per-upload behavior, supported formats, markdown output, and upload endpoint.
15
15
  - **Adopted:** preserve the upstream MIT license in the skill directory as explicitly required.
16
- - **Replaced:** direct `gh auth token` access with Junior's host-managed, repository-scoped installation credential injection so credentials never enter script output or files.
16
+ - **Replaced:** direct `gh auth token` access with Junior's host-managed requesting-user OAuth credential injection so credentials never enter script output or files.
17
17
  - **Replaced:** numeric repository-id override with explicit `owner/repo`; the script resolves the id through authenticated `gh api`.
18
18
  - **Narrowed:** automatic activation requires a concrete local path and GitHub destination.
19
- - **Deferred:** live upload verification because it would create an external GitHub asset; deterministic mocked validation is sufficient for implementation checks.
19
+ - **Verified:** a live upload with the repository-scoped installation credential returned HTTP 500; the endpoint's upstream implementation uses a user token.
20
20
 
21
21
  ## Coverage
22
22
 
@@ -23,7 +23,7 @@ Out of scope:
23
23
  - Run `scripts/upload.sh` once per local file.
24
24
  - Return image markdown or a bare video URL.
25
25
  - Surface per-file failures exactly enough for the user to act.
26
- - Use the GitHub plugin's repository-scoped installation credential injection; do not retrieve tokens in the script.
26
+ - Use the GitHub plugin's requesting-user OAuth credential injection; do not retrieve tokens in the script.
27
27
 
28
28
  ## Reference Architecture
29
29
 
@@ -40,7 +40,7 @@ Out of scope:
40
40
  ## Known Limitations
41
41
 
42
42
  - GitHub's user-attachment endpoint is not part of the documented public REST API.
43
- - A real upload requires GitHub to accept the repository-scoped installation credential for the target repository.
43
+ - A real upload requires the requesting user to authorize the GitHub App.
44
44
 
45
45
  ## Maintenance Notes
46
46
 
@@ -21,7 +21,8 @@ Use `git` and `gh` for repository work. Use `github_createPullRequest`, not `gh
21
21
  - Read applicable `AGENTS.md` files before editing. Narrower repo/task instructions win.
22
22
  - Preserve unrelated work. Never force-push, delete refs, or perform destructive merges.
23
23
  - Base conclusions on repository evidence. Do not claim a check ran unless it did.
24
- - Supported App-owned writes use an automatically injected repository-scoped credential. Try the operation before requesting remediation; ask for no user token.
24
+ - For Junior-owned pull requests, push the branch before creating the PR. The runtime supplies repository-scoped GitHub App credentials for both; try the operations before requesting remediation and never ask for a user token.
25
+ - A tool-routing denial requires the named tool; only an upstream denial justifies permission remediation.
25
26
  - Stop for ambiguous targets, missing access, destructive operations, or unresolved upstream permission failures.
26
27
 
27
28
  ## Workflow
@@ -36,9 +37,7 @@ For edits, choose the smallest credible validation path before changing files. C
36
37
 
37
38
  ### 2. Investigate
38
39
 
39
- Establish where the behavior lives, current versus requested behavior, root cause or gap, and the smallest proof of correctness. Read linked issues, PRs, specs, and failing output when provided. If the request is investigation-only, report evidence without editing.
40
-
41
- For non-trivial architecture, API, security, concurrency, migration, or broad cross-file work, use the available advisor after gathering evidence and before editing. Resolve material concerns in the plan.
40
+ Establish where the behavior lives, current versus requested behavior, root cause or gap, and the smallest proof of correctness. Read linked issues, PRs, specs, and failing output when provided. For pull requests, inspect conversation comments, inline review comments, reviews, the diff, and checks. If the request is investigation-only, report evidence without editing.
42
41
 
43
42
  ### 3. Edit
44
43
 
@@ -56,8 +55,6 @@ Do not install or repair the GitHub plugin runtime itself; that is manifest-owne
56
55
 
57
56
  Run targeted changed-file/package checks before broad suites. Separate regressions from baseline failures. For instruction-only changes, run available structural checks and perform a content-consistency review.
58
57
 
59
- For non-trivial work, review the final diff and initial results with the available advisor before packaging. Address material correctness, regression, and testing concerns, then rerun affected checks.
60
-
61
58
  ### 5. Package every completed edit
62
59
 
63
60
  Unless the user explicitly says not to create a PR, every completed repository edit must end in a pushed branch and PR. Default to draft; honor an explicit user or repo instruction to open it ready for review. Do not stop at local changes or a commit.
@@ -77,11 +74,3 @@ If PR creation is blocked, report the exact failed command/tool call and leave t
77
74
  When PR creation returns a subscribable resource hint, subscribe to suggested review/CI events. Report only actionable feedback addressed, build failures fixed, fully green/ready state, or merge.
78
75
 
79
76
  Return: repo, branch, PR URL/number, checks and results, pre-existing failures, and anything not run with the reason.
80
-
81
- ## Operation notes
82
-
83
- - **Clone/history:** clone shallowly by default; deepen before any operation that relies on omitted ancestry.
84
- - **PR inspection:** read conversation comments, inline review comments, reviews, diff, and checks.
85
- - **PR mutation:** push before create; use only supported endpoints in the API reference.
86
- - **Workflow dispatch:** `gh workflow run` is supported only for workflows declaring `workflow_dispatch`.
87
- - **Permissions:** a tool-routing denial requires the named tool; only an upstream denial justifies permission remediation.