feat: support full repository names in repositories input#372
Merged
Conversation
Allow repositories entries to include an owner when it matches the resolved owner. This supports values like github.repository while preserving the existing owner/default-owner behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
repositories input
repositories inputrepositories input
Contributor
There was a problem hiding this comment.
Pull request overview
Updates repository target resolution so the repositories input can include either bare repository names (repo) or full names (owner/repo), preventing duplicated owners when values like ${{ github.repository }} are used. This keeps token creation scoped to a single resolved owner and rejects repository entries whose owner doesn’t match that resolved owner.
Changes:
- Normalize
repositoriesentries by parsingrepovsowner/repo, stripping the owner for token-scoping while validating owner consistency. - Add tests + snapshot coverage for valid mixed inputs and for invalid/mismatched full-name cases.
- Update README/action metadata to document that full
owner/repoentries are supported with owner-match constraints.
Show a summary per file
| File | Description |
|---|---|
lib/main.js |
Adds parsing/normalization to accept owner/repo in repositories while enforcing a single resolved owner. |
README.md |
Documents full repository name support and owner-match rule for repositories. |
action.yml |
Updates repositories input description to mention owner/repo format. |
tests/*.test.js |
Adds new behavioral tests for full-name support and mismatch/invalid format errors. |
tests/index.js.snapshot |
Updates snapshots for new tests and new logging/error output. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 9/9 changed files
- Comments generated: 1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the action metadata description concise while documenting full owner/repository entries in the README note. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the README example concise and use a neutral repository name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a regression test for owner/repository input where the first repository is not the current repository, and teach the test helper to mock the normalized installation lookup. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the action metadata concise while mentioning that repository entries can use either repo or owner/repo form. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid implying that repository entries can target multiple owners from the compact action metadata description. The README keeps the detailed owner/repository guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
The
repositoriesinput currently treats values like${{ github.repository }}as a repository name, which can produce a duplicated owner in the installation lookup. This changes repository target resolution so entries may be bare repository names or fullowner/repositorynames, while preserving the existing resolved owner behavior.Full repository names are accepted only when their owner matches the
ownerinput, or the current repository owner whenowneris unset. The action still creates a single installation token for one owner, and generateddistartifacts are left unchanged for release.Fixes: #177