Action cannot match an existing same-repository sync PR
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 265
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
When frog/sync already has an open pull request, the Action finds and updates that pull request.
Current Behavior
The Action requests headRepository and headRepositoryOwner from gh pr list, then compares .headRepository.nameWithOwner with the full repository name.
The GitHub CLI exposes .headRepository.name, but nameWithOwner is an empty string in this response. The comparison rejects the existing pull request. Later steps can then treat the pull request as absent.
Possible Solution
Compare both fields that the CLI populates:
.headRepositoryOwner.login == $owner and
.headRepository.name == $name
Derive $owner and $name separately from GITHUB_REPOSITORY.
Minimal Reproducible Example
For a repository with an open pull request, run:
gh pr list \
--head frog/sync \
--state open \
--json number,headRepository,headRepositoryOwner
The repository object has this shape:
{
"headRepository": {
"name": "repo",
"nameWithOwner": ""
},
"headRepositoryOwner": {
"login": "owner"
}
}
The current nameWithOwner == "owner/repo" condition is therefore false.
Context
The affected comparison is in action/action.yml at commit 702c4eadefe175a208290a99c36e7f4ac1390e53.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the affected comparison in action/action.yml at commit 702c4eadefe175a208290a99c36e7f4ac1390e53, then run the documented gh pr list command to confirm the response fields. Update the repository matching to use the owner login and repository name separately, and verify that an existing open frog/sync pull request is found rather than treated as absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, shell
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100