@sentry/junior-github 0.241.0 → 0.243.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/index.js CHANGED
@@ -4578,6 +4578,9 @@ function githubApiWriteGrantName(method, upstreamUrl) {
4578
4578
  if ((method === "POST" || method === "DELETE") && /^\/repos\/[^/]+\/[^/]+\/pulls\/[^/]+\/requested_reviewers$/.test(pathname)) {
4579
4579
  return "installation-write";
4580
4580
  }
4581
+ if (method === "POST" && /^\/repos\/[^/]+\/[^/]+\/stacks(?:\/[^/]+\/(add|unstack))?$/.test(pathname)) {
4582
+ return "installation-write";
4583
+ }
4581
4584
  if (method === "POST" && /^\/repos\/[^/]+\/[^/]+\/pulls\/[^/]+\/comments(?:\/[^/]+\/replies)?$/.test(
4582
4585
  pathname
4583
4586
  )) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.241.0",
3
+ "version": "0.243.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.5.4",
34
- "@sentry/junior-plugin-api": "0.241.0"
34
+ "@sentry/junior-plugin-api": "0.243.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@oxlint/plugins": "1.79.0",
@@ -29,7 +29,8 @@ Use `git` and `gh` for repository work.
29
29
  - Use the requested repo. Otherwise read `github.repo` with standalone `jr-rpc config get github.repo`.
30
30
  - Pass `--repo owner/repo` to `gh`. Use `git -C PATH` for local repos.
31
31
  - Read each applicable `AGENTS.md` before edits.
32
- - Keep unrelated work. Never force-push, delete refs, or make destructive merges.
32
+ - Keep unrelated work. Never delete refs or make destructive merges.
33
+ - Force-push only with `--force-with-lease`, and only to branches Junior pushed or the requester named.
33
34
  - Use repository evidence. Report only checks you ran.
34
35
  - Push before `github_createPullRequest`. Never ask for a token for bot pushes.
35
36
  - When an error names a tool, use it. Change permissions only when GitHub rejected the request.
@@ -7,7 +7,7 @@ Guide evidence-first GitHub repository work from inspection through a reviewable
7
7
  ## Behavioral contract
8
8
 
9
9
  - Resolve and inspect the repository before acting.
10
- - Preserve unrelated work; reject destructive Git operations.
10
+ - Preserve unrelated work; reject destructive Git operations except `--force-with-lease` pushes to branches Junior pushed or the requester named.
11
11
  - Treat shallow clones as inspection checkouts; deepen before history work; never force-push around missing ancestry.
12
12
  - Install dependencies with the lockfile frozen mode before verification when needed.
13
13
  - Finish completed edits with a pushed PR unless the user opts out; default draft.
@@ -37,6 +37,9 @@ If the user omits `owner/repo`, run `jr-rpc config get github.repo`. Then pass `
37
37
  | Rerun / cancel | `gh run rerun RUN_ID -R owner/repo [--failed]` / `gh run cancel RUN_ID -R owner/repo` |
38
38
  | Mark PR ready / draft | `github_updatePullRequest` with `draft: false` / `draft: true` |
39
39
  | Request reviewers | `gh api repos/owner/repo/pulls/NUMBER/requested_reviewers --method POST --input reviewers.json` |
40
+ | Link stacked PRs | `gh stack link [STACK_NUMBER] PR_NUMBER...` (bottom to top) |
41
+ | Restack | `gh stack rebase` then `gh stack push`, or `gh stack sync` |
42
+ | Unstack | `gh stack unstack STACK_NUMBER` |
40
43
  | Submit review | `github_submitPullRequestReview` |
41
44
  | Set feedback status | `github_updatePullRequestFeedback` |
42
45
  | Resolve review thread | `github_resolvePullRequestReviewThread` |
@@ -52,6 +55,7 @@ If the user omits `owner/repo`, run `jr-rpc config get github.repo`. Then pass `
52
55
  - A local commit does not call GitHub. A push uses installation credentials. Workflow changes also need `workflows.write`.
53
56
  - Deepen a shallow clone before work that needs old history. Do not force-push to work around missing history.
54
57
  - Push `head` and read the default `base` before `github_createPullRequest`.
58
+ - Stacks: open each PR with `github_createPullRequest`, based on the branch below, before `gh stack link`. Without local stack state, run `gh stack checkout STACK_NUMBER` first. Do not pass `--open`.
55
59
  - 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.
56
60
  - Reviews and inline comments use the App bot.
57
61
  - PR comments/labels/assignees use issue endpoints; load `github-issues` for those.