Repository navigation
Revert "fix(github): encode owner and repo in request paths (#10085)" - #10086
waltonsteve147-coder wants to merge 1 commit into
Conversation
…oai#10085)" This reverts commit 748ee49.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[High impact] The path-building change reaches GitHub reads and writes across many workflow tools. This PR needs fixes before merging because ordinary tool inputs can change destructive GitHub actions. FindingsSummaryThis PR reverts GitHub request-path helpers across the integration and removes
|
| request: { | ||
| url: (params) => | ||
| `https://api.github.com/repos/${githubRepoPath(params.owner, params.repo)}/issues/${githubPathSegment(params.issue_number, 'issue_number')}/labels/${encodeURIComponent(params.name)}`, | ||
| `https://api.github.com/repos/${params.owner}/${params.repo}/issues/${params.issue_number}/labels/${encodeURIComponent(params.name)}`, |
There was a problem hiding this comment.
Identifiers can change destructive actions
With owner: 'octo' and repo: 'demo#', github_remove_label now sends DELETE /repos/octo/demo: the # causes the intended issue-and-label suffix to be omitted. If the saved token can delete that repository, removing a label deletes the repository instead. Likewise, gist_id: '<id>#' turns github_unstar_gist into gist deletion. Valid branch names are affected too: deleting release#123 targets release.
Restore the path helpers across these builders instead of inserting identifiers directly.
How this was verified: Model-writable identifiers reach authenticated DELETE requests, and the transport sends the URL path and query without its fragment.
Knowledge Base Used: Integrations, connectors, and tools
| return executeToolOperationImplementation(executeGitHubCommentOperation, request) | ||
| case 'github_comment_v2': | ||
| return await executeToolOperationImplementation(executeGitHubCommentV2Operation, request) | ||
| return executeToolOperationImplementation(executeGitHubCommentV2Operation, request) |
There was a problem hiding this comment.
Removing await makes rejected comment operations skip this catch. executeToolOperationImplementation lets errors pass through, including a GitHubOperationError when GitHub returns 401. The caller refreshes credentials only when this handler returns a 401 Response, so an expired token now fails the comment instead of refreshing and retrying.
Keep return await in both comment cases so failures reach the existing error response.
| return executeToolOperationImplementation(executeGitHubCommentOperation, request) | |
| case 'github_comment_v2': | |
| return await executeToolOperationImplementation(executeGitHubCommentV2Operation, request) | |
| return executeToolOperationImplementation(executeGitHubCommentV2Operation, request) | |
| return await executeToolOperationImplementation(executeGitHubCommentOperation, request) | |
| case 'github_comment_v2': | |
| return await executeToolOperationImplementation(executeGitHubCommentV2Operation, request) |
This reverts commit 748ee49.
Summary
Brief description of what this PR does and why.
Fixes #(issue)
Product update (if relevant)
Who benefits, and what can they do now? Note rollout or plan restrictions, link the relevant Sim integration or docs guide, and include a real product demo or changelog production brief when available.
Type of Change
Testing
How has this been tested? What should reviewers focus on?
Checklist
Screenshots/Videos