Repository navigation
PR Artifacts API update - #4013
Open
BigDadBear wants to merge 2 commits into
Open
BigDadBear wants to merge 2 commits into
BigDadBear wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Coupled changes to mutation routes, commit/type semantics, and deletion-confirmation identity need maintainer validation because the authoritative API reference was unavailable (404).
No open issues 🎉
What changed in this PR
Updates the experimental PR artifact tools to support GitHub’s number-based API while retaining name-based upserts.
Changes:
- Adds get and update operations using PR-scoped artifact numbers.
- Updates deletion confirmation and adds artifact type support.
- Refreshes tests, schema snapshots, and documentation.
| File | Description |
|---|---|
| pkg/github/pull_request_artifacts.go | Implements number-based operations and confirmation. |
| pkg/github/pull_request_artifacts_test.go | Covers new operations, validation, and request formats. |
| pkg/github/pull_request_artifact_types.go | Updates tool inputs and outputs. |
| pkg/github/pull_request_artifact_names_test.go | Verifies number-based targeting despite display-name collisions. |
| pkg/github/pull_request_artifact_approval_test.go | Updates deletion approval tests for artifact numbers. |
| pkg/github/__toolsnaps__/pull_request_artifact_write_ff_pull_request_artifacts.snap | Records updated write schemas. |
| pkg/github/__toolsnaps__/pull_request_artifact_read_ff_pull_request_artifacts.snap | Records updated read schemas. |
| docs/feature-flags.md | Documents operations, artifact types, and commit selection. |
Review effort: Balanced (adaptive)
Auto-generated by license-check workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Update the PR artifact tools for the revised, number-based artifact API.
Why
The upstream API is changing its item endpoints from names to PR-scoped artifact numbers.
What changed
MCP impact
Get, update, and delete use
artifact_number; upsert still usesnameorname_key. This is a breaking API transition: coordinate deployment with the upstream change, which is not yet merged.Prompts tested (tool changes only)
Security / limits
GitHub enforces repository and artifact permissions; existing lockdown restrictions, response sanitization, and list pagination limits remain in place. Delete confirmation is bound to the repository, PR, and artifact number.
Tool renaming
deprecated_tool_aliases.goNote: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.
Lint & tests
./script/lint./script/testBoth passed. Also passed
UPDATE_TOOLSNAPS=true go test ./...andUPDATE_TOOLSNAPS=true go test ./pkg/github -run '^TestPullRequestArtifactTools$' -count=1.Docs
script/generate-docspassed; the PR updatesdocs/feature-flags.md.Skills
The existing catalog explicitly exempts both PR artifact tools because artifact management is not covered by the current bundled skills.