René's URL Explorer Experiment


Title: Split PR review creation, commenting and submission, and deletion by williammartin · Pull Request #381 · github/github-mcp-server · GitHub

Open Graph Title: Split PR review creation, commenting and submission, and deletion by williammartin · Pull Request #381 · github/github-mcp-server

X Title: Split PR review creation, commenting and submission, and deletion by williammartin · Pull Request #381 · github/github-mcp-server

Description: Description Relates to: #343 @toby @SamMorrowDrums before I go any further cleaning up the new and old tools, handling edge cases and adding unit, I want to get your feedback on this approach, since there have been quite a few pain points along the way. The original issue suggested removing comments from create_pull_request_review and depending on add_pull_request_review_comment, however, add_pull_request_review_comment uses the REST API which is only able to create a single comment and only if a review is not already in progress. Thus, we need to lean on GraphQL here to: Create a pending review (mvp_create_pending_pull_request_review) Add a comment to that pending review (mvp_add_pull_request_review_comment_to_pending_review) Submit the pending review (mvp_submit_pull_request_review) The implicit requirement here is that a user may only have one pending review at a time, so if we get their most recent review on a PR, and it is pending, we can add a comment to that. This does not allow commenting on other reviews and it does not allow commenting on already submitted reviews, which could be further enhancements in the same or in different tools. There is an additional challenge since we are now using GraphQL which is that for the most part, queries and mutations operate on GraphQL IDs (node_id in the REST API). So for example, when we create a pending review, there is a reviewId that is required for commenting. Within a single session, it would be easy to return the id in the textContent but this: Leaks the API implementation (maybe not a big deal?) Would require new sessions to request the Id in some way in order to provide it the next time For now, I've decided with these very explicit tools (e.g. mvp_add_pull_request_review_comment_to_pending_review) to allow the model to be API implementation agnostic, and that the tool will internally do the lookup. For example, since we know there can only be one review for the user, knowing the owner, repo and pr number seems to be enough to look up the most recent review. The downside is that it's a bit more restrictive and requires more internal API lookups than an alternative which might be to expose a get_pending_review and allow the model to figure it out. If you asked me I would ship this and wait for feedback on when it sucks or should be enhanced later but I don't have much confidence in my intuition here. Cheers. Currently passes e2e tests: ➜ github-mcp-server git:(0ca07aa) ✗ GOMAXPROCS=1 GITHUB_MCP_SERVER_E2E_TOKEN=$(gh auth token) go test -v -count=1 --tags e2e ./e2e === RUN TestGetMe === PAUSE TestGetMe === RUN TestToolsets === PAUSE TestToolsets === RUN TestTags === PAUSE TestTags === RUN TestPullRequestReview === PAUSE TestPullRequestReview === CONT TestGetMe e2e_test.go:49: Building Docker image for e2e tests... e2e_test.go:123: Starting Stdio MCP client... --- PASS: TestGetMe (3.33s) === CONT TestPullRequestReview e2e_test.go:123: Starting Stdio MCP client... e2e_test.go:384: Getting current user... e2e_test.go:413: Creating repository williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:437: Creating branch in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:454: Creating commit with new file in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:482: Creating pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:497: Creating pending review for pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:518: Adding review comment to pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:534: Submitting review for pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:548: Getting reviews for pull request in williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... e2e_test.go:422: Deleting repository williammartin/github-mcp-server-e2e-TestPullRequestReview-1746631692347... --- PASS: TestPullRequestReview (9.26s) === CONT TestTags e2e_test.go:123: Starting Stdio MCP client... e2e_test.go:246: Getting current user... e2e_test.go:275: Creating repository williammartin/github-mcp-server-e2e-TestTags-1746631701637... e2e_test.go:292: Creating tag williammartin/github-mcp-server-e2e-TestTags-1746631701637:v0.0.1... e2e_test.go:322: Listing tags for williammartin/github-mcp-server-e2e-TestTags-1746631701637... e2e_test.go:355: Getting tag williammartin/github-mcp-server-e2e-TestTags-1746631701637:v0.0.1... e2e_test.go:284: Deleting repository williammartin/github-mcp-server-e2e-TestTags-1746631701637... --- PASS: TestTags (3.75s) === CONT TestToolsets e2e_test.go:123: Starting Stdio MCP client... --- PASS: TestToolsets (0.17s) PASS ok github.com/github/github-mcp-server/e2e 16.767s

Open Graph Description: Description Relates to: #343 @toby @SamMorrowDrums before I go any further cleaning up the new and old tools, handling edge cases and adding unit, I want to get your feedback on this approach, sinc...

X Description: Description Relates to: #343 @toby @SamMorrowDrums before I go any further cleaning up the new and old tools, handling edge cases and adding unit, I want to get your feedback on this approach, sinc...

Opengraph URL: https://github.com/github/github-mcp-server/pull/381

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a85f5119-ed74-e2bb-5cd9-0e73cd6fac61
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD1A6:F7C62:89B7BE:C1B067:6B06DABC
html-safe-nonce083db684fdb6c189353446d50e9d56f89b0333789ced59425820d9d38bbe03f6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUE2OkY3QzYyOjg5QjdCRTpDMUIwNjc6NkIwNkRBQkMiLCJ2aXNpdG9yX2lkIjoiNjgwODA3Nzg2NTI3Njg1NzAyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdf5ef14a7590fd987754b97257988b1798dd3e81b72bdf0b1a164cdb6de1aa7d
hovercard-subject-tagpull_request:2504835354
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/github-mcp-server/pull/381/files
twitter:imagehttps://avatars.githubusercontent.com/u/1611510?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1611510?s=400&v=4
og:image:altDescription Relates to: #343 @toby @SamMorrowDrums before I go any further cleaning up the new and old tools, handling edge cases and adding unit, I want to get your feedback on this approach, sinc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None06cadd0061c549662a50be90eb5baba7608f00f521574931eec01db0deb9e636
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id942771284
octolytics-dimension-repository_nwogithub/github-mcp-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id942771284
octolytics-dimension-repository_network_root_nwogithub/github-mcp-server
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6953c712585a8d7406b7695e48fffcb670fd241d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/github-mcp-server/pull/381/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F381%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fgithub-mcp-server%2Fpull%2F381%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fgithub-mcp-server
Reloadhttps://github.com/github/github-mcp-server/pull/381/files
Reloadhttps://github.com/github/github-mcp-server/pull/381/files
Reloadhttps://github.com/github/github-mcp-server/pull/381/files
githubhttps://github.com/github
github-mcp-serverhttps://github.com/github/github-mcp-server
Codehttps://github.com/github/github-mcp-server
Issues238 (238)https://github.com/github/github-mcp-server/issues
Pull requests228 (228)https://github.com/github/github-mcp-server/pulls
Discussionshttps://github.com/github/github-mcp-server/discussions
Actionshttps://github.com/github/github-mcp-server/actions
Security and quality2 (2)https://github.com/github/github-mcp-server/security
Insightshttps://github.com/github/github-mcp-server/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fgithub-mcp-server%2Fissues%2Fnew%2Fchoose
williammartinhttps://github.com/williammartin
mainhttps://github.com/github/github-mcp-server/tree/main
343-remove-comments-from-create_pull_request_reviewhttps://github.com/github/github-mcp-server/tree/343-remove-comments-from-create_pull_request_review
Conversation 33 https://github.com/github/github-mcp-server/pull/381
Commits 2 https://github.com/github/github-mcp-server/pull/381/commits
Checks 0 https://github.com/github/github-mcp-server/pull/381/checks
Findings https://github.com/github/github-mcp-server/pull/381/findings
Files changed https://github.com/github/github-mcp-server/pull/381/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
Split PR review creation, commenting and submission, and deletion https://github.com/github/github-mcp-server/pull/381/files#top
Show all changes 2 commits https://github.com/github/github-mcp-server/pull/381/files
192a38a Split PR review creation, commenting, submission and deletion williammartin Apr 25, 2025 https://github.com/github/github-mcp-server/pull/381/commits/192a38a6b1ee658664ba67bab46c2933b7cd5d36
f0c9d52 WIP williammartin May 14, 2025 https://github.com/github/github-mcp-server/pull/381/commits/f0c9d525f5aa6bd83cc6b8d3a9b32ce17d0f9e41
Clear filters https://github.com/github/github-mcp-server/pull/381/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
e2e_test.go https://github.com/github/github-mcp-server/pull/381/files#diff-e91d29c6d4c58503d9c2d72e2b04f1b70901a613e23008d1d1cfe8beff7038d4
go.mod https://github.com/github/github-mcp-server/pull/381/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
go.sum https://github.com/github/github-mcp-server/pull/381/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
server.go https://github.com/github/github-mcp-server/pull/381/files#diff-efffdb5f6c0e96b376f9f02d7a887ea629058c21a95e161981c5c08e41f12e0c
pullrequests.go https://github.com/github/github-mcp-server/pull/381/files#diff-c2e2a7250ef597d08ee5d429159bc89c4b862a7ed6cbcf30b8231a3ec599d190
pullrequests_test.go https://github.com/github/github-mcp-server/pull/381/files#diff-efebb180e5ae7933bb1c29403a3c82937a5716357f0c9538781f23770635872f
server.go https://github.com/github/github-mcp-server/pull/381/files#diff-b6e388e2a018b4bc415a18e7dd986e6b7730931af9d26c37ba4be38988e421ed
server_test.go https://github.com/github/github-mcp-server/pull/381/files#diff-014ce2a5e97b449dbaacef3a9a5b1cb9bd0e7a863b095ef29117af2a1d3bdf85
tools.go https://github.com/github/github-mcp-server/pull/381/files#diff-bcdea1f25cf43d8b075cfa770714fc9db90a9fe0bb05e5172304b66912b33889
third-party-licenses.darwin.md https://github.com/github/github-mcp-server/pull/381/files#diff-e4cb81371a7eb69f52c0c3e0d88e88ffca440f18fb38d292135e5acf706becea
third-party-licenses.linux.md https://github.com/github/github-mcp-server/pull/381/files#diff-11cd7bbf955824294eca14577a315025a4f4c81cc6fc678414983199d9497830
third-party-licenses.windows.md https://github.com/github/github-mcp-server/pull/381/files#diff-b9bb4518ae54a3751ff96ac27a80508a05d3eaf6a7c0e012b2a68b8f61a6b526
LICENSE https://github.com/github/github-mcp-server/pull/381/files#diff-16cd324c1af8b1fdb820c9ed1812a27c04b0a372fdc9a8d5b68d5faaa7f3e6f8
LICENSE https://github.com/github/github-mcp-server/pull/381/files#diff-b3b690f409fb02dbaad75755654b8c41b7aa46406dc0fa64132033ee8c6810db
LICENSE https://github.com/github/github-mcp-server/pull/381/files#diff-d3c00551dfbc89d2d08cba927348b3f600690f0acf95ef417cb5f3811f5ae4af
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
e2e/e2e_test.gohttps://github.com/github/github-mcp-server/pull/381/files#diff-e91d29c6d4c58503d9c2d72e2b04f1b70901a613e23008d1d1cfe8beff7038d4
View file https://github.com/github/github-mcp-server/blob/f0c9d525f5aa6bd83cc6b8d3a9b32ce17d0f9e41/e2e/e2e_test.go
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
go.modhttps://github.com/github/github-mcp-server/pull/381/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
View file https://github.com/github/github-mcp-server/blob/f0c9d525f5aa6bd83cc6b8d3a9b32ce17d0f9e41/go.mod
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/381/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/381/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/github/github-mcp-server/pull/381/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/github/github-mcp-server/pull/381/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
go.sumhttps://github.com/github/github-mcp-server/pull/381/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
View file https://github.com/github/github-mcp-server/blob/f0c9d525f5aa6bd83cc6b8d3a9b32ce17d0f9e41/go.sum
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/381/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/381/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/github/github-mcp-server/pull/381/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/github/github-mcp-server/pull/381/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
https://github.com/github/github-mcp-server/blob/main/.github/CODEOWNERS#L1
internal/ghmcp/server.gohttps://github.com/github/github-mcp-server/pull/381/files#diff-efffdb5f6c0e96b376f9f02d7a887ea629058c21a95e161981c5c08e41f12e0c
View file https://github.com/github/github-mcp-server/blob/f0c9d525f5aa6bd83cc6b8d3a9b32ce17d0f9e41/internal/ghmcp/server.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/github-mcp-server/pull/381/{{ revealButtonHref }}
https://github.com/github/github-mcp-server/pull/381/files#diff-efffdb5f6c0e96b376f9f02d7a887ea629058c21a95e161981c5c08e41f12e0c
https://github.com/github/github-mcp-server/pull/381/files#diff-efffdb5f6c0e96b376f9f02d7a887ea629058c21a95e161981c5c08e41f12e0c
https://github.com/github/github-mcp-server/pull/381/files#diff-efffdb5f6c0e96b376f9f02d7a887ea629058c21a95e161981c5c08e41f12e0c
williammartinhttps://github.com/williammartin
May 9, 2025https://github.com/github/github-mcp-server/pull/381/files#r2081867471
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
SamMorrowDrumshttps://github.com/SamMorrowDrums
May 13, 2025https://github.com/github/github-mcp-server/pull/381/files#r2086981747
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
https://github.com/github/github-mcp-server/pull/381/files#diff-efffdb5f6c0e96b376f9f02d7a887ea629058c21a95e161981c5c08e41f12e0c
Please reload this pagehttps://github.com/github/github-mcp-server/pull/381/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.