Report whether an issue fork exists and stop setup-remote when it does not - #384
Merged
Merged
Conversation
…t does not issue:get-fork printed fork URLs for forks that do not exist, and the json and llm formats gave no way to tell that from a fork with no branches. issue:setup-remote then added the remote, failed on the fetch, and left the dead remote behind. The project lookup already answers the question, so the action now records its outcome as an exists flag on the result. The branch lookup is separate so a failed listing cannot report a missing fork. setup-remote and checkout stop before touching git when the flag is false. Fixes #379 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.
Fixes #379.
issue:get-forkprinted fork URLs for a fork that did not exist, and--format=jsonand--format=llmgave no way to tell that from a fork with no branches.issue:setup-remotethen added the remote, failed on the fetch, and left the dead remote behind.What changed
IssueForkResultgainsexists, set from the outcome of the project lookup the action already made. No extra request. The branch lookup runs separately, so a failed branch listing cannot report a missing fork."exists": falsein json,<exists>false</exists>in llm,**Exists:** noin md. The text format now distinguishes "Fork does not exist yet" from "Fork exists but has no branches yet".issue:setup-remotethrows before adding the remote when the fork does not exist.issue:checkoutstops with the same message instead of offering to run setup-remote.drupalorg-clianddrupalorg-work-on-issueskills document the flag and the new error.Testing
Unit tests cover a fork with branches, a fork with no branches, a 503 on the branch listing, a missing fork, and that setup-remote never reaches git when the fork is missing.
Live, without a token, against poll issue 3007808 which has no fork:
🤖 Generated with Claude Code