Skip to content

fix: correct variable interpolation in GitHub API URLs#198

Open
klaidliadon wants to merge 1 commit intomasterfrom
fix/github-api-url-interpolation
Open

fix: correct variable interpolation in GitHub API URLs#198
klaidliadon wants to merge 1 commit intomasterfrom
fix/github-api-url-interpolation

Conversation

@klaidliadon
Copy link
Copy Markdown
Contributor

@klaidliadon klaidliadon commented Apr 1, 2026

Summary

  • {$INPUT_REPOSITORY}${INPUT_REPOSITORY} in all GitHub API URLs across both git-commit and git-copy actions
  • The misplaced { produced URLs like /repos/{owner/repo}/pulls — GitHub returns an error object, and jq '. | length' fails with Cannot index object with number
  • Affects the "nothing to commit" and PR creation/lookup paths in both actions

Test plan

  • Trigger a run that hits the "Nothing to commit" path → should no longer fail on jq
  • Trigger a run that creates a PR → API call should succeed

{$INPUT_REPOSITORY} puts a literal '{' in the URL, making the API
return an error object instead of an array. This causes jq to fail
with 'Cannot index object with number' on the nothing-to-commit and
PR creation paths.
@klaidliadon klaidliadon force-pushed the fix/github-api-url-interpolation branch from 7b60ce9 to 60872ce Compare April 1, 2026 10:47
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.

2 participants