Skip to content

feat(github): Add typed issue creation tool - #687

Merged
dcramer merged 15 commits into
mainfrom
feat/github-create-issue-tool
Jun 30, 2026
Merged

dcramer merged 15 commits into
mainfrom
feat/github-create-issue-tool

Conversation

@dcramer

@dcramer dcramer commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

The GitHub plugin is now a TypeScript-built package with its runtime tools split into source modules. Issue creation moves from shell-owned gh issue create guidance into a typed createIssue plugin tool that validates input with TypeBox, sends the REST create request through host egress, and keeps GitHub App/user credential handling inside the existing plugin credential path.

createIssue records idempotency before the provider write using the conversation id and tool call id. Completed creates replay the stored issue number and URL, definitive non-create failures clear pending state, and ambiguous provider outcomes fail closed so retries do not open duplicate issues. The issue body footer is now only a Sentry session link when SENTRY_DSN/SENTRY_ORG_SLUG can build one; otherwise no footer is written.

The GitHub issue skill now tells agents to use createIssue for new issues while leaving non-create issue operations on gh. GitHub plugin tests live in packages/junior-github with package-local Vitest/MSW setup, and root lint/build/typecheck/test/CI scripts include the GitHub package so that coverage runs with the rest of the workspace.

Refs GH-660

Create GitHub issues through the plugin-owned egress path so the runtime owns the final issue body and Junior conversation footer.

Bind issue creation idempotency to the runtime conversation and tool call, preserving pending state when the provider result is uncertain to avoid duplicate issue writes.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 30, 2026 4:20am

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jun 29, 2026
Comment thread packages/junior-github/index.js Resolved
Clear the createIssue pending marker only when GitHub returns a definitive non-success response, while preserving fail-closed behavior for uncertain post-attempt failures.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Keep GitHub plugin registration in index.js while moving the typed issue creation tool into a dedicated tools.js module, matching the plugin/tool split used by other packages.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Comment thread packages/junior-github/tools.js Resolved
Comment thread packages/junior-github/tools.js Resolved
Clear pending idempotency state only for definitive GitHub 4xx rejections and keep ambiguous server failures fail-closed.

Return the created issue result when completed-state persistence fails after the provider write succeeds.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Move the GitHub createIssue implementation into a per-tool module and keep the root tools file focused on assembling plugin tools. This keeps the package ready for additional tools without growing one implementation file.\n\nRefs GH-660\nCo-Authored-By: GPT-5 Codex <[email protected]>
Move the GitHub plugin to the same source and build layout as memory, with authored TypeScript under src and generated package output under dist. Switch Junior tests to import the workspace package boundary instead of sibling source paths.\n\nRefs GH-660\nCo-Authored-By: GPT-5 Codex <[email protected]>
@github-actions github-actions Bot added risk: high PR risk score: high and removed risk: medium PR risk score: medium labels Jun 30, 2026
Update the pending idempotency marker with the created issue result once GitHub returns success, so retries can return the result even if the follow-up completed-state write fails. Cover the retry path in the tool test.\n\nRefs GH-660\nCo-Authored-By: GPT-5 Codex <[email protected]>
Remove generated GitHub package build output from the branch. The package keeps its TypeScript source and build scripts, with dist produced by build/prepack instead of committed.\n\nRefs GH-660\nCo-Authored-By: GPT-5 Codex <[email protected]>
Use a TypeBox schema as the GitHub createIssue tool contract and derive the TypeScript input type from it. Keep local validation focused on semantic constraints like non-empty values and owner/name repo parsing.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
dcramer and others added 2 commits June 29, 2026 19:50
Clear createIssue pending idempotency state when host egress raises an authorization-required pause before provider write completion. Keep ambiguous provider failures fail-closed, and cover retry after GitHub auth resumes.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
Only clear createIssue pending state for auth pauses and definitive non-creation GitHub responses. Keep throttling and other ambiguous provider failures fail-closed to avoid duplicate issues.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
Remove the extra normalized input layer and generic record helper from the GitHub createIssue tool. Build the request directly from the schema-parsed input and keep validation local to the fields that need it.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
Only append a GitHub issue footer when Sentry configuration can produce a session URL. Make that footer just the View Session in Sentry link, and strip old managed footer blocks when no link is available.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
Move GitHub plugin unit coverage into the GitHub package and add a package-local Vitest/MSW harness.

Update issue skill docs to use createIssue for issue creation, and keep the package boundary pointed at built declarations without publishing source or sourcemaps.

Make createIssue durable idempotency state schema-owned and fail visibly when the completed state cannot be persisted after provider creation, preserving the pending retry guard.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6aee596. Configure here.

Comment thread package.json Resolved
Include @sentry/junior-github tests in the root test and test:ci scripts so package-local GitHub plugin coverage runs in CI.

Refs GH-660
Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer merged commit 053b951 into main Jun 30, 2026
19 checks passed
@dcramer
dcramer deleted the feat/github-create-issue-tool branch June 30, 2026 15:32

This branch was successfully deployed

1 active deployment
Preview – junior-docs — d84acbc9 Deployed Jun 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant