@sentry/junior-github 0.43.0 → 0.45.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/SETUP.md CHANGED
@@ -13,6 +13,7 @@ In GitHub:
13
13
  - Issues: Read and write
14
14
  - Contents: Read and write
15
15
  - Pull requests: Read and write
16
+ - Actions: Read and write
16
17
  - Metadata: Read
17
18
 
18
19
  4. Create the app and generate a private key.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior-github",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/plugin.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: github
2
- description: GitHub issue management via GitHub App
2
+ description: GitHub issue, pull request, and repository workflows via GitHub App
3
3
 
4
4
  capabilities:
5
5
  - actions.read
@@ -77,7 +77,7 @@ Repository checkout, source-code investigation, and pull request operations via
77
77
  #### 4. Execute
78
78
 
79
79
  - Run `git push` first so `gh pr create` does not trigger hidden push/fork behavior; then `gh pr create --repo owner/repo --head BRANCH ...`.
80
- - If `git push` returns 401/403 or another auth/permission error, verify the command is targeting the right repository and retry once. If it still clearly indicates bad or revoked credentials, rerun the real GitHub command and let the runtime trigger a reconnect flow.
80
+ - If `git push` returns 401/403 or another auth/permission error, verify the command is targeting the right repository and retry once. If it still fails, report the exact command failure and the GitHub App installation/permission remediation.
81
81
  - Treat `gh pr merge` as a contents mutation and keep repository context explicit.
82
82
 
83
83
  #### 5. Report result
@@ -91,4 +91,5 @@ Repository checkout, source-code investigation, and pull request operations via
91
91
  - Answer source-code questions from repository evidence, not product framing or generic memory.
92
92
  - Default to shallow clones; do not use a full clone unless the task requires repository history or the user asks for it.
93
93
  - If repository or installation access is missing, stop and return a concrete remediation message.
94
+ - GitHub App auth is host-managed; do not ask the user to reconnect a GitHub account.
94
95
  - Do not execute repository admin mutations.
@@ -22,7 +22,7 @@ Treat explicit repo flags as command-targeting safety rails, not as a credential
22
22
  ## Command matrix
23
23
 
24
24
  | Operation | Command |
25
- | ---------------------------------- | ----------------------------------------------------------------------------------------- | -------- | ---------- |
25
+ | ---------------------------------- | ----------------------------------------------------------------------------------------- |
26
26
  | Clone repository (default shallow) | `gh repo clone owner/repo [DIRECTORY] -- --depth=1` |
27
27
  | Deepen shallow clone | `git -C DIRECTORY fetch --depth=N origin` |
28
28
  | Convert shallow clone to full | `git -C DIRECTORY fetch --unshallow` |
@@ -30,9 +30,9 @@ Treat explicit repo flags as command-targeting safety rails, not as a credential
30
30
  | Create pull request | `gh pr create --repo owner/repo --head BRANCH --base BASE --title "..." --body-file PATH` |
31
31
  | Update pull request | `gh pr edit NUMBER --repo owner/repo [--title "..."] [--body-file PATH]` |
32
32
  | Close pull request | `gh pr close NUMBER --repo owner/repo` |
33
- | Merge pull request | `gh pr merge NUMBER --repo owner/repo [--merge | --squash | --rebase]` |
33
+ | Merge pull request | `gh pr merge NUMBER --repo owner/repo [--merge \| --squash \| --rebase]` |
34
34
  | View pull request | `gh pr view NUMBER --repo owner/repo [--json ...]` |
35
- | List pull requests | `gh pr list --repo owner/repo [--state open | closed | merged]` |
35
+ | List pull requests | `gh pr list --repo owner/repo [--state open \| closed \| merged]` |
36
36
  | Diff pull request | `gh pr diff NUMBER --repo owner/repo` |
37
37
  | Check pull request status | `gh pr checks NUMBER --repo owner/repo` |
38
38
  | View PR review comments | `gh api repos/{owner}/{repo}/pulls/{number}/comments` |
@@ -54,7 +54,7 @@ jr-rpc config set github.repo owner/repo
54
54
  - Prefer `--json` output for machine-readable parsing where available.
55
55
  - Pass extra `git clone` flags after `--` (e.g. `gh repo clone owner/repo -- --depth=1`).
56
56
  - Before `gh pr create`, push the head branch explicitly, then use `--head` so `gh` does not trigger hidden push/fork behavior. That push requires GitHub write access to the remote.
57
- - If the explicit `git push` fails with 401/403 or another auth/permission error, verify the repo context and retry once. If the error still clearly indicates bad credentials, rerun the real GitHub command and let the runtime trigger a reconnect flow.
57
+ - If the explicit `git push` fails with 401/403 or another auth/permission error, verify the repo context and retry once. If it still fails, report the exact command failure and the GitHub App installation/permission remediation.
58
58
  - `gh pr edit` is not a single-permission command: title/body/base/reviewer changes fit `github.pull-requests.write`; label, assignee, milestone changes fit `github.issues.write` (use the `github-issues` skill); project flags are outside the current GitHub App capability model.
59
59
  - `gh pr close --comment` may need `github.issues.write` (use `github-issues`); `gh pr close --delete-branch` needs `github.contents.write`.
60
60
  - Return actionable errors for auth, permission, not-found, and validation failures.
@@ -2,22 +2,23 @@
2
2
 
3
3
  Use this table to recover quickly while keeping operations deterministic.
4
4
 
5
- | Symptom | Likely cause | Fix |
6
- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
7
- | `unknown command "..."` from `gh` | CLI version too old or wrong binary in the plugin runtime. | Verify `gh --version`; if it is unavailable or too old, report that the GitHub plugin runtime dependency is not available. |
8
- | `unknown flag: --depth` from `gh repo clone` | `git clone` flags were passed before `--`. | Pass clone flags after `--`, for example `gh repo clone owner/repo -- --depth=1`. |
9
- | `Missing required option --repo` | Repo not passed and no default was resolved. | Resolve with `jr-rpc config get github.repo`; pass `--repo owner/repo` explicitly when missing. |
10
- | Command affects or authenticates against the wrong repo | Stale `github.repo` default or authenticated command missing explicit repo. | Pass `--repo owner/repo` for the target repository, or update `github.repo` before retrying. |
11
- | `GraphQL: Could not resolve to a Repository` | Repo slug is wrong or inaccessible. | Validate `owner/repo` and confirm app installation on target repository. |
12
- | 401 Unauthorized | Repo context is missing, stale, or the stored GitHub auth needs reconnect. | Verify `--repo owner/repo` or `github.repo`, then retry the real command once so the runtime can reconnect automatically when needed. |
13
- | `git push` fails with 401/403 or auth/permission output | Write auth was stale or the command is targeting the wrong repo. | Verify the remote and repo context, retry the same push once, then confirm app permissions and installation scope if the retry still fails. |
14
- | 403 Forbidden | App lacks required permission on repo or install scope is too narrow. | Verify the repo context, then confirm GitHub App permissions and installation scope. |
15
- | `gh pr create` fails with auth/permission errors or tries to push interactively | The branch was not pushed first, or repo context is wrong. | Push the branch explicitly first, then rerun `gh pr create --repo owner/repo --head BRANCH ...`. |
16
- | `git blame`, long log history, or old commits are missing after clone | Repo was cloned shallow by design. | Deepen incrementally with `git -C DIRECTORY fetch --depth=N origin`, or `git -C DIRECTORY fetch --unshallow` when full history is required. |
17
- | `sandbox setup failed (dnf install gh failed ...)` | `gh` package not available from the plugin runtime dependency bootstrap. | Report the plugin runtime bootstrap failure; do not try to repair package installation from the skill workflow. |
5
+ | Symptom | Likely cause | Fix |
6
+ | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
7
+ | `unknown command "..."` from `gh` | CLI version too old or wrong binary in the plugin runtime. | Verify `gh --version`; if it is unavailable or too old, report that the GitHub plugin runtime dependency is not available. |
8
+ | `unknown flag: --depth` from `gh repo clone` | `git clone` flags were passed before `--`. | Pass clone flags after `--`, for example `gh repo clone owner/repo -- --depth=1`. |
9
+ | `Missing required option --repo` | Repo not passed and no default was resolved. | Resolve with `jr-rpc config get github.repo`; pass `--repo owner/repo` explicitly when missing. |
10
+ | Command affects or authenticates against the wrong repo | Stale `github.repo` default or authenticated command missing explicit repo. | Pass `--repo owner/repo` for the target repository, or update `github.repo` before retrying. |
11
+ | `GraphQL: Could not resolve to a Repository` | Repo slug is wrong or inaccessible. | Validate `owner/repo` and confirm app installation on target repository. |
12
+ | 401 Unauthorized | Host-managed GitHub App credentials were rejected. | Verify the target repo, then report the exact command failure and confirm the app installation and host environment variables. |
13
+ | `git push` fails with 401/403 or auth/permission output | Write permission is missing, app installation is too narrow, or remote is wrong. | Verify the remote and repo context, retry once, then confirm app permissions and installation scope if it still fails. |
14
+ | 403 Forbidden | App lacks required permission on repo or install scope is too narrow. | Verify the repo context, then confirm GitHub App permissions and installation scope. |
15
+ | `gh pr create` fails with auth/permission errors or tries to push interactively | The branch was not pushed first, or repo context is wrong. | Push the branch explicitly first, then rerun `gh pr create --repo owner/repo --head BRANCH ...`. |
16
+ | `git blame`, long log history, or old commits are missing after clone | Repo was cloned shallow by design. | Deepen incrementally with `git -C DIRECTORY fetch --depth=N origin`, or `git -C DIRECTORY fetch --unshallow` when full history is required. |
17
+ | `sandbox setup failed (dnf install gh failed ...)` | `gh` package not available from the plugin runtime dependency bootstrap. | Report the plugin runtime bootstrap failure; do not try to repair package installation from the skill workflow. |
18
18
 
19
19
  ## Retry guidance
20
20
 
21
- - Retry once for transient auth/transport failures after verifying repo context.
21
+ - Retry once for transient transport failures after verifying repo context.
22
22
  - Do not loop retries on repeated 401/403/404 validation errors.
23
+ - Do not describe GitHub auth failures as user reconnect work; this plugin uses host-managed GitHub App credentials.
23
24
  - For persistent permission problems, return explicit remediation and stop.
@@ -95,3 +95,4 @@ Run [references/issue-quality-checklist.md](references/issue-quality-checklist.m
95
95
  - Do not overwrite issue fields unless explicitly requested. Prefer partial updates over full body replacement.
96
96
  - For `bug` issues, do not present a fix as definitive unless root-cause evidence is explicit.
97
97
  - If repository or installation access is missing, stop and return a concrete remediation message.
98
+ - GitHub App auth is host-managed; do not ask the user to reconnect a GitHub account.
@@ -2,20 +2,21 @@
2
2
 
3
3
  Use this table to recover quickly while keeping operations deterministic.
4
4
 
5
- | Symptom | Likely cause | Fix |
6
- | ------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
7
- | `unknown command "issue"` from `gh` | CLI version too old or wrong binary in the plugin runtime. | Verify `gh --version`; if it is unavailable or too old, report that the GitHub plugin runtime dependency is not available. |
8
- | `Missing required option --repo` | Repo not passed and no default was resolved. | Resolve with `jr-rpc config get github.repo`; pass `--repo owner/repo` explicitly when missing. |
9
- | Command affects or authenticates against the wrong repo | Stale `github.repo` default or authenticated command missing explicit repo. | Pass `--repo owner/repo` for the target repository, or update `github.repo` before retrying. |
10
- | `GraphQL: Could not resolve to a Repository` | Repo slug is wrong or inaccessible. | Validate `owner/repo` and confirm app installation on target repository. |
11
- | 401 Unauthorized | Repo context is missing, stale, or the stored GitHub auth needs reconnect. | Verify `--repo owner/repo` or `github.repo`, then retry the real command once so the runtime can reconnect automatically when needed. |
12
- | 403 Forbidden | App lacks required permission on repo or install scope is too narrow. | Verify the repo context, then confirm GitHub App permissions and installation scope. |
13
- | 404 Not Found | Issue number or repo is wrong. | Validate repo + issue ID with `gh issue view NUMBER --repo owner/repo`. |
14
- | `gh issue edit` does not change labels | Wrong flag usage or wrong repo context. | Use repeated `--add-label/--remove-label` flags and keep `--repo owner/repo` explicit. |
15
- | Comment command fails with empty body | Body file missing/empty. | Ensure comment file exists and has content before `gh issue comment`. |
5
+ | Symptom | Likely cause | Fix |
6
+ | ------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
7
+ | `unknown command "issue"` from `gh` | CLI version too old or wrong binary in the plugin runtime. | Verify `gh --version`; if it is unavailable or too old, report that the GitHub plugin runtime dependency is not available. |
8
+ | `Missing required option --repo` | Repo not passed and no default was resolved. | Resolve with `jr-rpc config get github.repo`; pass `--repo owner/repo` explicitly when missing. |
9
+ | Command affects or authenticates against the wrong repo | Stale `github.repo` default or authenticated command missing explicit repo. | Pass `--repo owner/repo` for the target repository, or update `github.repo` before retrying. |
10
+ | `GraphQL: Could not resolve to a Repository` | Repo slug is wrong or inaccessible. | Validate `owner/repo` and confirm app installation on target repository. |
11
+ | 401 Unauthorized | Host-managed GitHub App credentials were rejected. | Verify the target repo, then report the exact command failure and confirm the app installation and host environment variables. |
12
+ | 403 Forbidden | App lacks required permission on repo or install scope is too narrow. | Verify the repo context, then confirm GitHub App permissions and installation scope. |
13
+ | 404 Not Found | Issue number or repo is wrong. | Validate repo + issue ID with `gh issue view NUMBER --repo owner/repo`. |
14
+ | `gh issue edit` does not change labels | Wrong flag usage or wrong repo context. | Use repeated `--add-label/--remove-label` flags and keep `--repo owner/repo` explicit. |
15
+ | Comment command fails with empty body | Body file missing/empty. | Ensure comment file exists and has content before `gh issue comment`. |
16
16
 
17
17
  ## Retry guidance
18
18
 
19
- - Retry once for transient auth/transport failures after verifying repo context.
19
+ - Retry once for transient transport failures after verifying repo context.
20
20
  - Do not loop retries on repeated 401/403/404 validation errors.
21
+ - Do not describe GitHub auth failures as user reconnect work; this plugin uses host-managed GitHub App credentials.
21
22
  - For persistent permission problems, return explicit remediation and stop.