-
Notifications
You must be signed in to change notification settings - Fork 142
Fix cross-repository support in remove_labels and assign_to_user handlers #15218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lers Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🧪 Smoke Project is now testing project operations... |
|
✅ Changeset Generator completed successfully! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes cross-repository behavior in the remove_labels and assign_to_user safe-output handlers by honoring target-repo and validating per-message repo overrides via the shared repo_helpers.cjs utilities, aligning them with the existing cross-repo pattern used by other handlers.
Changes:
- Updated
remove_labels.cjsandassign_to_user.cjsto resolve the effective repo viaresolveTargetRepoConfig/resolveAndValidateRepoand to userepoParts.owner/repoParts.repoin GitHub API calls. - Added cross-repo test coverage for both handlers (target-repo, per-message repo, allowed repo rejection, bare repo qualification).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/setup/js/remove_labels.cjs | Uses repo resolution/validation helpers and calls issues.removeLabel against the resolved target repo. |
| actions/setup/js/assign_to_user.cjs | Uses repo resolution/validation helpers and calls issues.addAssignees against the resolved target repo. |
| actions/setup/js/remove_labels.test.cjs | Adds tests covering target-repo and allowed repo behaviors for remove_labels. |
| actions/setup/js/assign_to_user.test.cjs | Adds tests covering target-repo and allowed repo behaviors for assign_to_user. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent Container Tool Check ✅All development tools are available in the agent container:
Result: 12/12 tools available ✅ All required development tools passed verification.
|
|
✅ Smoke Project completed successfully. All project operations validated. |
|
PRs: #15211 "[docs] Unbloat CLI commands reference documentation", #15210 "Add sanitized
|
Smoke Test Results -
|
| Test | Result |
|---|---|
| GitHub MCP | ✅ |
| Safe Inputs GH CLI | ✅ |
| Serena MCP | ❌ |
| Playwright | ✅ |
| File Ops | ✅ |
| Build | ✅ |
| Discussion | ✅ |
| Workflow Dispatch | ✅ |
Status: 8/9 tests passed (Serena MCP tool unavailable)
@pelikhan @Copilot
AI generated by Smoke Copilot
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
Problem
remove_labels.cjsandassign_to_user.cjshardcodedcontext.repoin API calls, ignoring thetarget-repoconfiguration. This blocked cross-repository workflows that need to operate on issues/PRs in external repos (e.g., triage workflows in a side repo managing issues in the main repo).Changes
Applied the same pattern from #15027 (
add_labels.cjs,close_issue.cjs) to both handlers:remove_labels.cjsresolveTargetRepoConfig/resolveAndValidateRepofromrepo_helpers.cjs...context.repowith explicitrepoParts.owner/repoParts.repoinremoveLabelAPI callsallowed_repossupportassign_to_user.cjsresolveTargetRepoConfig/resolveAndValidateRepofromrepo_helpers.cjscontext.repo.owner/context.repo.repowithrepoParts.owner/repoParts.repoinaddAssigneesAPI callsallowed_repossupportTests
Usage
The upstream plumbing (Go compiler, config generation, MCP schema) was already wired correctly - the handlers just weren't reading the config.
Original prompt
remove_labelsandassign_to_usersafe output handlers do not support target-repo for cross-repository operations #15216✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Changeset