Visitar URL original
Add atomic parent issue creation by zwick · Pull Request #3134 · github/github-mcp-server · GitHub
Skip to content

Add atomic parent issue creation - #3134

Merged
SamMorrowDrums merged 6 commits into
mainfrom
zwick-atomic-sub-issue-creation
Aug 25, 2026
Merged

SamMorrowDrums merged 6 commits into
mainfrom
zwick-atomic-sub-issue-creation

Conversation

@zwick

@zwick zwick commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds optional same- or cross-repository parent attachment to issue creation through GitHub's existing atomic GraphQL createIssue capability.

Why

The MCP tools previously required separate create and parent-attachment calls, leaving a partial-failure window even though CreateIssueInput.parentIssueId already supports atomic creation.

What changed

  • Add parent_issue_number with optional paired parent_owner and parent_repo inputs; omit both parent repository coordinates to use the new issue's repository.
  • Resolve user-facing identifiers before sending the parent, labels, and other supported fields in one createIssue mutation, with no attachment fallback.
  • Keep the existing REST path for unparented creation; parented creation rejects issue_fields rather than broadening this focused change.

Token impact

Measured with tiktoken 0.14.0 using o200k_base. Exact billed tokens remain host- and model-dependent.

Uncached startup surface Main This PR Delta
Default {name, description, inputSchema} tool payload 10,589 10,737 +148 (+1.40%)
Default tool-level descriptions 1,347 1,347 0
Granular Issues {name, description, inputSchema} payload 12,863 12,983 +120 (+0.93%)
Representative successful operation Previous two-step Atomic Savings
Same-repository parent 176 66 110 (62.5%)
Cross-repository parent 179 79 100 (55.9%)

The fixed increase is entirely in the input schema. Operational savings come from removing the second tool call and its full-parent response.

Token measurement commands
# Capture actual tools/list output from binaries built at main and this branch.
go build -o /tmp/github-mcp-server ./cmd/github-mcp-server
go build -o /tmp/mcpcurl ./cmd/mcpcurl
/tmp/mcpcurl --pretty=false \
  --stdio-server-cmd '/tmp/github-mcp-server stdio' schema > /tmp/tools.json

# Verify the relevant behavior and request counts.
go test ./pkg/github \
  -run 'TestIssueWriteCreateWithParent|Test_AddSubIssue|TestGranularCreateIssue' \
  -count=1

# Tokenize compact tools/list and representative call/result JSON.
python3 -m venv /tmp/token-count
/tmp/token-count/bin/pip install 'tiktoken==0.14.0'
/tmp/token-count/bin/python - <<'PY'
import json
import tiktoken

payload = json.dumps(
    json.load(open('/tmp/tools.json'))['result']['tools'],
    separators=(',', ':'),
)
for name in ('o200k_base', 'cl100k_base'):
    print(name, len(tiktoken.get_encoding(name).encode(payload)))
PY

The comparison repeated the schema capture against main and the feature branch, and separately tokenized the representative atomic and two-step call/result payloads.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed — parented creation now uses one GraphQL mutation; unparented creation retains its existing REST behavior.
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered — GitHub validates access to both explicitly named repositories, and GraphQL permission or compatibility errors surface without a non-atomic fallback.
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@zwick zwick self-assigned this Aug 21, 2026
@zwick
zwick marked this pull request as ready for review August 24, 2026 13:13
@zwick
zwick requested a review from a team as a code owner August 24, 2026 13:13
Copilot AI balanced review requested due to automatic review settings August 24, 2026 13:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds atomic parent attachment during issue creation through GitHub’s GraphQL API while retaining REST for unparented issues.

Changes:

  • Adds same- and cross-repository parent parameters.
  • Resolves metadata before a single atomic creation mutation.
  • Adds unit coverage, snapshots, and generated documentation.
Show a summary per file
File Description
README.md Documents parent inputs.
pkg/github/issues.go Implements atomic parented creation.
pkg/github/issues_test.go Tests validation and GraphQL behavior.
pkg/github/issues_granular.go Extends granular issue creation.
pkg/github/__toolsnaps__/issue_write.snap Updates consolidated schema snapshot.
pkg/github/__toolsnaps__/create_issue.snap Updates granular schema snapshot.
docs/insiders-features.md Documents consolidated inputs.
docs/feature-flags.md Documents feature-flagged schemas.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread pkg/github/issues.go
Comment thread pkg/github/issues.go Outdated
@zwick
zwick marked this pull request as draft August 24, 2026 13:33
@zwick
zwick marked this pull request as ready for review August 24, 2026 13:41
zwick and others added 6 commits August 24, 2026 10:26
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f71d9868-eef8-4fb0-84c6-df7c9a6a0ade
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f71d9868-eef8-4fb0-84c6-df7c9a6a0ade
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f71d9868-eef8-4fb0-84c6-df7c9a6a0ade
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f71d9868-eef8-4fb0-84c6-df7c9a6a0ade
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: f71d9868-eef8-4fb0-84c6-df7c9a6a0ade
@zwick
zwick force-pushed the zwick-atomic-sub-issue-creation branch from 77c6971 to 4bf240f Compare August 24, 2026 14:26

@SamMorrowDrums SamMorrowDrums left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, I think it makes sense to make this atomic.

@SamMorrowDrums
SamMorrowDrums merged commit 884c791 into main Aug 25, 2026
19 checks passed
@SamMorrowDrums
SamMorrowDrums deleted the zwick-atomic-sub-issue-creation branch August 25, 2026 11:48
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
github-mcp-server 1.11.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Highlights

- **Smarter OAuth challenges:** per-call scope checks request only the permissions each tool invocation needs with runtime checks where required.
- **Improved browser OAuth support:** CORS now works across OAuth discovery routes, with configurable authorization-server URLs.
- **Improved sub-issue workflow:** create parent and sub-issues atomically.
- **Better HTTP caching for STDIO:** REST responses support ETag conditional requests.
- **Runtime refresh:** upgraded to Go 1.27authorizationauthorization plus routine security and dependency updates.

## What's Changed
* feat(http): add --authorization-server flag to override OAuth AS URL by @Anika-Sol in github/github-mcp-server#2900
* Name the root command after the installed binary by @plusky in github/github-mcp-server#2998
* fix(http): preserve CORS across OAuth routes by @SamMorrowDrums in github/github-mcp-server#3147
* Add atomic parent issue creation by @zwick in github/github-mcp-server#3134
* Add ETag conditional requests to the REST transport by @joshfree in github/github-mcp-server#3026
* build(deps): bump github/codeql-action from 4 to 4.37.4 by @dependabot[bot] in github/github-mcp-server#3004
* Add per-call OAuth scope checks by @SamMorrowDrums in github/github-mcp-server#3128
* build(deps): bump docker/setup-buildx-action from 4.2.0 to 4.3.0 by @dependabot[bot] in github/github-mcp-server#3157
* build(deps): bump github.com/go-chi/chi/v5 from 5.3.1 to 5.3.2 by @dependabot[bot] in github/github-mcp-server#3156
* build(deps): bump distroless/base-debian12 from `76b3162` to `fabbf1c` by @dependabot[bot] in github/github-mcp-server#3154
* build(deps): bump golang from 1.25.13-alpine to 1.27.0-alpine by @dependabot[bot] in github/github-mcp-server#3153
* build(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by @dependabot[bot] in github/github-mcp-server#3155

## New Contributors
* @Anika-Sol made their first contribution in github/github-mcp-server#2900
* @plusky made their first contribution in github/github-mcp-server#2998
* @joshfree made their first contribution in github/github-mcp-server#3026

**Full Changelog**: https://github.com/github/github-mcp-server/compare/v1.10.1...v1.11.0</pre>
  <p>View the full release notes at <a href="https://github.com/github/github-mcp-server/releases/tag/v1.11.0">https://github.com/github/github-mcp-server/releases/tag/v1.11.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!17684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants