@sentry/junior-github 0.30.0 → 0.32.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/package.json +1 -1
- package/skills/github-code/SKILL.md +5 -2
- package/skills/github-code/references/api-surface.md +1 -0
- package/skills/github-code/references/troubleshooting-workarounds.md +2 -2
- package/skills/github-issues/SKILL.md +11 -7
- package/skills/github-issues/references/api-surface.md +2 -0
- package/skills/github-issues/references/issue-examples.md +22 -1
- package/skills/github-issues/references/troubleshooting-workarounds.md +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: github-code
|
|
3
|
-
description: Clone
|
|
4
|
-
uses-config: github.repo
|
|
3
|
+
description: Clone repositories, inspect source, edit code, and manage pull requests with GitHub CLI. Use for repo implementation questions, cloning/editing, PR inspection/mutation, and PR auth-order questions. For PR auth order, answer that `git push` needs GitHub remote write access before `gh pr create`. Prefer this skill for repository and code tasks even when the repo concerns Sentry products.
|
|
5
4
|
allowed-tools: bash
|
|
6
5
|
---
|
|
7
6
|
|
|
@@ -22,6 +21,8 @@ Repository checkout, source-code investigation, and pull request operations via
|
|
|
22
21
|
|
|
23
22
|
- Determine whether the task is `clone`, `source-code investigation`, a pull request inspection (`view`, `list`, `diff`, `checks`), or a pull request mutation (`create`, `update`, `close`, `merge`).
|
|
24
23
|
- Resolve repository (`owner/repo`). If not explicit, query channel config with `jr-rpc config get github.repo` before running any `gh` or `git` command. If still missing, ask the user.
|
|
24
|
+
- Run `jr-rpc config get github.repo` as its own bash command. Do not combine it with `cd`, `&&`, pipes, or any `gh` or `git` command.
|
|
25
|
+
- After resolving a configured repo, pass it explicitly to the next `gh` command with `--repo owner/repo`; do not rely on implicit GitHub CLI repository discovery.
|
|
25
26
|
- Resolve the pull request number for operations targeting an existing PR.
|
|
26
27
|
- Keep `--repo owner/repo` explicit on `gh` commands so the command itself targets the intended repository, not a stale default.
|
|
27
28
|
|
|
@@ -47,6 +48,7 @@ Repository checkout, source-code investigation, and pull request operations via
|
|
|
47
48
|
|
|
48
49
|
- Use for questions like "where is this implemented?", "how does this workflow work in code?", "is there already logic for X?", or "verify this from the repo."
|
|
49
50
|
- If the current workspace already contains the target repository, inspect local files directly before cloning.
|
|
51
|
+
- Do not treat this skill's `SKILL.md`, bundled references, or `/vercel/sandbox/skills/...` as target repository source code. If no checkout of the target repo is present, inspect the configured GitHub repository by cloning it shallowly or reading files through `gh` before answering.
|
|
50
52
|
- Prefer the narrowest deterministic evidence: local file search, exact file reads, targeted clone inspection, existing issues/PRs, tests.
|
|
51
53
|
- Cite repository evidence in the reply: file paths, symbols, issue/PR numbers, or commit references when known.
|
|
52
54
|
- If evidence is incomplete, say what is unknown instead of guessing.
|
|
@@ -65,6 +67,7 @@ Repository checkout, source-code investigation, and pull request operations via
|
|
|
65
67
|
|
|
66
68
|
#### 3. Resolve mutation inputs
|
|
67
69
|
|
|
70
|
+
- For PR creation credential/order questions, explicitly answer that repository context comes first, then `git push` pushes the branch with GitHub remote write access, then `gh pr create` runs against the pushed branch with pull-request permissions.
|
|
68
71
|
- For PR creation, resolve the base branch (explicit user request wins; otherwise repository default).
|
|
69
72
|
- Resolve the head branch from the current checkout or user request.
|
|
70
73
|
- If the head branch may not exist on the remote yet, push it explicitly before PR creation.
|
|
@@ -5,6 +5,7 @@ All operations use `gh` CLI. Commands must be deterministic and non-interactive.
|
|
|
5
5
|
## Repo scoping
|
|
6
6
|
|
|
7
7
|
When the user omits `owner/repo`, resolve `github.repo` first with `jr-rpc config get github.repo`, then pass the resolved repo explicitly on the actual `gh` or `git` command.
|
|
8
|
+
Run `jr-rpc config get github.repo` as a standalone bash command. Never chain it with `cd`, `&&`, pipes, or a provider command.
|
|
8
9
|
Treat explicit repo flags as command-targeting safety rails, not as a credential-scoping mechanism.
|
|
9
10
|
|
|
10
11
|
## Capability to command mapping
|
|
@@ -4,7 +4,7 @@ Use this table to recover quickly while keeping operations deterministic.
|
|
|
4
4
|
|
|
5
5
|
| Symptom | Likely cause | Fix |
|
|
6
6
|
| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
-
| `unknown command "..."` from `gh` | CLI version too old or wrong binary.
|
|
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
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
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
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. |
|
|
@@ -14,7 +14,7 @@ Use this table to recover quickly while keeping operations deterministic.
|
|
|
14
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
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
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
|
|
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
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: github-issues
|
|
3
|
-
description: Create, update, comment on, label, and inspect GitHub issues via GitHub CLI with concise, evidence-backed content. Use when users ask to open, edit, view, close, reopen, or triage GitHub issues — including tracking bugs, features, or tasks. Prefer this skill over generic repository tools for
|
|
4
|
-
uses-config: github.repo
|
|
3
|
+
description: Create, update, comment on, label, and inspect GitHub issues via GitHub CLI with concise, evidence-backed content. Use when users ask to open, edit, view, close, reopen, or triage GitHub issues — including tracking bugs, features, or tasks. Prefer this skill over generic repository tools for issue operations; do not use for pull requests, branches, pushes, or PR auth-order questions.
|
|
5
4
|
allowed-tools: bash
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# GitHub Issue Operations
|
|
9
8
|
|
|
10
9
|
Issue create, update, comment, label, state, and inspection via `gh` CLI.
|
|
10
|
+
Use only for GitHub issues. For pull requests, branches, pushes, or PR auth-order questions, load `github-code` instead.
|
|
11
11
|
|
|
12
12
|
## Reference loading
|
|
13
13
|
|
|
@@ -23,6 +23,8 @@ Issue create, update, comment, label, state, and inspection via `gh` CLI.
|
|
|
23
23
|
|
|
24
24
|
- Determine whether the task is `create`, `update`, `comment`, `labels`, `state`, or read-only inspection.
|
|
25
25
|
- Resolve repository (`owner/repo`). If not explicit, query channel config with `jr-rpc config get github.repo` before running any `gh` command. If still missing, ask the user.
|
|
26
|
+
- Run `jr-rpc config get github.repo` as its own bash command. Do not combine it with `cd`, `&&`, pipes, or any `gh` command.
|
|
27
|
+
- After resolving a configured repo, pass it explicitly to the next `gh` command with `--repo owner/repo`; do not rely on implicit GitHub CLI repository discovery.
|
|
26
28
|
- Resolve the issue number for non-create operations.
|
|
27
29
|
- Keep `--repo owner/repo` explicit on `gh` commands so the command itself targets the intended repository, not a stale default.
|
|
28
30
|
|
|
@@ -55,11 +57,11 @@ Follow [references/research-rules.md](references/research-rules.md) for cross-ty
|
|
|
55
57
|
- Generalize session framing — strip channel references, slash commands, Slack thread IDs, user @mentions, and transcript fragments; replace with the underlying technical problem.
|
|
56
58
|
- Compress source material. Research notes, hypotheses, or transcripts become a short summary + scoped bullets — never paste raw investigation into the body.
|
|
57
59
|
- Do not add desired outcome, expected behavior, or acceptance criteria unless the thread explicitly requests them.
|
|
58
|
-
- When the request originated from a Slack thread or any on-behalf-of context, append a final line `Action taken on behalf of <name>.` using the
|
|
60
|
+
- When the request originated from a Slack thread or any on-behalf-of context, append a final line `Action taken on behalf of <name>.` using the action requester's real name. The action requester is the current `<requester>` or the person who explicitly asked you to create/update the issue, not necessarily the original reporter.
|
|
59
61
|
|
|
60
62
|
**Attribution:**
|
|
61
63
|
|
|
62
|
-
- Mention who raised the issue when clear from the thread.
|
|
64
|
+
- Mention who raised the issue when clear from the thread. If the reporter differs from the action requester, keep them separate with durable body text such as `Reported by Alice.` or `Raised by Alice during incident triage.`
|
|
63
65
|
- Attach screenshots from the thread as image links when present.
|
|
64
66
|
- Include code snippets, related issues, and related PRs only when they materially improve the issue.
|
|
65
67
|
|
|
@@ -68,7 +70,7 @@ Follow [references/research-rules.md](references/research-rules.md) for cross-ty
|
|
|
68
70
|
Before running the `gh` create/edit command, check each gate. If any fails, revise and re-check before executing:
|
|
69
71
|
|
|
70
72
|
- Title length ≤ 60 characters.
|
|
71
|
-
- Delegated-action footer is the last line when applicable, using the
|
|
73
|
+
- Delegated-action footer is the last line when applicable, using the action requester's real name, not the reporter's name unless they are the same person.
|
|
72
74
|
- No session framing remains (channel refs, slash commands, @mentions, Slack thread IDs).
|
|
73
75
|
- Body structure matches complexity — no empty sections, no restated title, no raw research dump.
|
|
74
76
|
|
|
@@ -77,11 +79,13 @@ Run [references/issue-quality-checklist.md](references/issue-quality-checklist.m
|
|
|
77
79
|
### 5. Execute
|
|
78
80
|
|
|
79
81
|
- Use `gh issue` commands from [references/api-surface.md](references/api-surface.md).
|
|
80
|
-
-
|
|
82
|
+
- For issue listing or other read-only inspection, prefer `--json` output so empty results still produce deterministic stdout.
|
|
83
|
+
- Check duplicates silently before creating a new issue. Do not mention this check in the final reply unless a duplicate blocks creation.
|
|
81
84
|
|
|
82
85
|
### 6. Report result
|
|
83
86
|
|
|
84
|
-
- Return canonical issue URL, issue number, issue type
|
|
87
|
+
- Return canonical issue URL, issue number, and issue type.
|
|
88
|
+
- Mention only user-visible issue changes. Do not mention duplicate checks, searches, "no duplicates found", or routine preparation steps.
|
|
85
89
|
|
|
86
90
|
## Guardrails
|
|
87
91
|
|
|
@@ -5,6 +5,7 @@ All operations use `gh` CLI. Commands must be deterministic and non-interactive.
|
|
|
5
5
|
## Repo scoping
|
|
6
6
|
|
|
7
7
|
When the user omits `owner/repo`, resolve `github.repo` first with `jr-rpc config get github.repo`, then pass the resolved repo explicitly on the actual `gh` command.
|
|
8
|
+
Run `jr-rpc config get github.repo` as a standalone bash command. Never chain it with `cd`, `&&`, pipes, or a `gh` command.
|
|
8
9
|
Treat explicit repo flags as command-targeting safety rails, not as a credential-scoping mechanism.
|
|
9
10
|
|
|
10
11
|
## Capability to command mapping
|
|
@@ -25,6 +26,7 @@ Treat explicit repo flags as command-targeting safety rails, not as a credential
|
|
|
25
26
|
| Add labels | `gh issue edit NUMBER --repo owner/repo --add-label LABEL [--add-label LABEL2]` |
|
|
26
27
|
| Remove labels | `gh issue edit NUMBER --repo owner/repo --remove-label LABEL [--remove-label LABEL2]` |
|
|
27
28
|
| Add comment | `gh issue comment NUMBER --repo owner/repo --body-file PATH` |
|
|
29
|
+
| List issues | `gh issue list --repo owner/repo --json number,title,state,url --limit 20` |
|
|
28
30
|
| Read issue | `gh issue view NUMBER --repo owner/repo --json number,title,state,labels,assignees,author,url,body` |
|
|
29
31
|
| Read comments | `gh api /repos/owner/repo/issues/NUMBER/comments --method GET --header "Accept: application/vnd.github+json"` |
|
|
30
32
|
|
|
@@ -69,6 +69,26 @@ Good scope — quantified and specific:
|
|
|
69
69
|
>
|
|
70
70
|
> Action taken on behalf of Jane Doe.
|
|
71
71
|
|
|
72
|
+
## Distinct reporter/requester example
|
|
73
|
+
|
|
74
|
+
Bad attribution:
|
|
75
|
+
|
|
76
|
+
> The bot resolved the review thread even though the warning still applies.
|
|
77
|
+
>
|
|
78
|
+
> Action taken on behalf of Bojan Oro.
|
|
79
|
+
|
|
80
|
+
Good attribution:
|
|
81
|
+
|
|
82
|
+
> Warden can resolve its own review thread even when the underlying warning still appears valid and the PR remains blocked.
|
|
83
|
+
>
|
|
84
|
+
> Reported by Bojan Oro.
|
|
85
|
+
>
|
|
86
|
+
> - Observed on a PR where Warden left a review comment about a missing backport
|
|
87
|
+
> - The review thread was later marked resolved by the bot
|
|
88
|
+
> - The PR still showed a blocking warning
|
|
89
|
+
>
|
|
90
|
+
> Action taken on behalf of David Cramer.
|
|
91
|
+
|
|
72
92
|
## Feature example
|
|
73
93
|
|
|
74
94
|
Bad framing:
|
|
@@ -111,5 +131,6 @@ Good framing — current state, gap, options:
|
|
|
111
131
|
- Confident fix claims without root-cause evidence
|
|
112
132
|
- Speculative detail mixed into verified facts
|
|
113
133
|
- Dumping a list of URLs without inline context
|
|
114
|
-
- Session-specific content (
|
|
134
|
+
- Session-specific content (slash commands, channel references, raw transcript framing, or unrelated user chatter)
|
|
135
|
+
- Conflating reporter and action requester when they differ
|
|
115
136
|
- Missing delegated attribution footer on user-requested issue creation
|
|
@@ -4,7 +4,7 @@ Use this table to recover quickly while keeping operations deterministic.
|
|
|
4
4
|
|
|
5
5
|
| Symptom | Likely cause | Fix |
|
|
6
6
|
| ------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
-
| `unknown command "issue"` from `gh` | CLI version too old or wrong binary.
|
|
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
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
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
10
|
| `GraphQL: Could not resolve to a Repository` | Repo slug is wrong or inaccessible. | Validate `owner/repo` and confirm app installation on target repository. |
|