Repository navigation
feat: add issue-repo input to comment on issues in another repository - #326
Merged
Merged
Conversation
Allows the issue comment posted via the issue input to target an issue or pull request in a repository other than the one running the workflow, e.g. when an orchestration repository runs tests for pull requests that live in other repositories. Defaults to the current repository, so existing behavior is unchanged. Requires GITHUB_TOKEN to have write access to the target repository.
uglide
marked this pull request as ready for review
August 20, 2026 15:10
Contributor
|
Thank you @uglide, this is a great addition. Released in v1.20 |
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.
Motivation
The
issueinput makes it possible to comment the report on a specific issue or pull request, but the target repository is always the one running the workflow (context.repo). Some setups (like ours at Redis) run tests in a central orchestration repository while the pull requests being tested live in other repositories — for example, we run client-library test suites for theredisclients in a single testing repository, and the results need to land on the client repo's PR. Today that requires a custom script, even though the underlying client functions (addCommentToIssue,updateComment,listComments,deleteComment) already acceptowner/repoparameters andGITHUB_TOKENcan already be a PAT with cross-repo access.Changes
issue-repoinput (owner/repoformat): the repository containing the issue or pull request to comment on. Defaults to the repository running the workflow, so existing behavior is unchanged.issuecode path (postOrUpdateIssueComment); thepull-requestpath is untouched since it is inherently bound to the triggering PR event.resolveIssueRepohelper validates the format and falls back tocontext.repo; a malformed value surfaces through the existing warning path.issue-repoadded to the README options block plus a cross-repo usage example.resolveIssueRepofallback, override, and malformed-input cases in__tests__/github/handler.test.ts.dist/rebuilt withnpm run package.Backwards compatibility
issue-repodefaults to'', which resolves tocontext.repo— identical to current behavior. Comment dedup/update/overwrite (comment-tag,update-comment,overwrite-comment,always-latest-comment) work unchanged sincehandleCommentand the client layer were already repo-parameterized.npm run checkandnpm testpass (106 tests).