Skip to content

feat: support full repository names in repositories input#372

Merged
parkerbxyz merged 8 commits into
mainfrom
parkerbxyz/fix-repositories-github-repository
May 11, 2026
Merged

feat: support full repository names in repositories input#372
parkerbxyz merged 8 commits into
mainfrom
parkerbxyz/fix-repositories-github-repository

Conversation

@parkerbxyz
Copy link
Copy Markdown
Contributor

@parkerbxyz parkerbxyz commented May 9, 2026

The repositories input 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 full owner/repository names, while preserving the existing resolved owner behavior.

Full repository names are accepted only when their owner matches the owner input, or the current repository owner when owner is unset. The action still creates a single installation token for one owner, and generated dist artifacts are left unchanged for release.

Fixes: #177

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>
@parkerbxyz parkerbxyz changed the title Support full repository names in repositories Support full repository names in repositories input May 9, 2026
@parkerbxyz parkerbxyz changed the title Support full repository names in repositories input feat: support full repository names in repositories input May 9, 2026
@parkerbxyz parkerbxyz self-assigned this May 9, 2026
@parkerbxyz parkerbxyz marked this pull request as ready for review May 9, 2026 00:35
@parkerbxyz parkerbxyz requested a review from a team as a code owner May 9, 2026 00:35
Copilot AI review requested due to automatic review settings May 9, 2026 00:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 repositories entries by parsing repo vs owner/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/repo entries 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

Comment thread action.yml Outdated
parkerbxyz and others added 2 commits May 11, 2026 11:01
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 9/9 changed files
  • Comments generated: 1

Comment thread lib/main.js
parkerbxyz and others added 2 commits May 11, 2026 11:28
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 1

Comment thread action.yml
parkerbxyz and others added 2 commits May 11, 2026 12:07
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>
@parkerbxyz parkerbxyz merged commit 85eb8dd into main May 11, 2026
7 checks passed
@parkerbxyz parkerbxyz deleted the parkerbxyz/fix-repositories-github-repository branch May 11, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The repositories input doesn't play nicly with ${{ github.repository }}

2 participants