fix: Error comparing non-existent remote branch #391
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.
fix: #271
Description
When updating a comment, a PR link is added. This step compares the branch name created by Claude with the remote repository. However, the problem is that the locally created branch has not been pushed to the remote repository, which causes the comparison to fail. A suspected cause is that in this PR #244, the branch update operation was delayed, while the action to add the PR link occurs before it.
Additionally, the naming of the
checkAndCommitOrDeleteBranchfunction seems problematic. The name is misleading because it implies that the function will automatically commit a new local branch. However, in reality, the function only processes its logic when the remote branch already exists, which is a clear contradiction.Solution
Assume the PR link is already included in Claude's response, then just skip the manual PR creation step in the action. This is a minimal change and can be easily rolled back even if it doesn't take effect.