Skip to content

Conversation

@vilsonrodrigues
Copy link
Contributor

Summary

Fix the merge-bot /update command that was failing to checkout PR branches correctly.

Problem

The update command was failing with this error:

##[error]A branch or tag with the name 'branch-name' could not be found

This happened because the actions/checkout@v4 step wasn't specifying which repository to checkout from, causing it to only fetch default branches and not the PR branch.

Solution

Added the repository parameter to the checkout action to explicitly specify the head repository (${{ steps.pr_info.outputs.head_repo }}).

Changes

  • Updated .github/workflows/merge-bot.yml line 406
  • Added repository: ${{ steps.pr_info.outputs.head_repo }} parameter

This fix was already applied and tested successfully in the msgspec-ext repository.

Testing

The fix ensures that:

  • ✅ The bot can correctly checkout PR branches from the same repository
  • ✅ The /update command works as expected
  • ✅ No need for additional PAT tokens - GITHUB_TOKEN is sufficient

🤖 Generated with Claude Code

vilsonrodrigues and others added 2 commits November 26, 2025 12:37
…organization

- Add CODEOWNERS for automatic review assignment
- Add issue templates (bug report, feature request)
- Add pull request template with comprehensive checklist
- Add pre-commit config with gitleaks, uv-lock, and ruff
- Improve release-drafter.yml with more categories and better organization
- Move AUTOMATION.md and ROADMAP.md to docs/ directory
- Remove MERGE_BOT_GUIDE.md (content moved to AUTOMATION.md in English)
- Update AUTOMATION.md with /update command documentation
- Move Development section from README to CONTRIBUTING.md
- Update ROADMAP version from v0.2.0 to v1.1.0
- Update all documentation references to new file locations
The update command was failing because the checkout action wasn't
specifying which repository to checkout from. This caused it to only
fetch the default branches and not the PR branch.

Added 'repository' parameter to the checkout action to explicitly
specify the head repository, fixing the branch checkout issue.

Same fix as applied to msgspec-ext repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation ci CI/CD changes dependencies Dependency updates size/XL Extra large PR labels Nov 27, 2025
@vilsonrodrigues
Copy link
Contributor Author

/merge

@github-actions github-actions bot merged commit c881495 into main Nov 27, 2025
10 checks passed
@github-actions
Copy link
Contributor

✅ PR merged successfully by @vilsonrodrigues!

@github-actions github-actions bot deleted the chore/improve-repo-structure branch November 27, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD changes dependencies Dependency updates documentation Improvements or additions to documentation size/XL Extra large PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants