Skip to content

fix: GitHubRepoForker should check if branch is accessible before continuing #1939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

julian-risch
Copy link
Member

Related Issues

I ran into 404 errors when using the GitHub Forker. The fork was always created correctly but the error was raised. When the fork is created it still takes a few seconds before the branch becomes accessible. _check_fork_status only checked for the repo to exist until now. This PR extends the check to also ensure the branch is accessible.

/usr/local/lib/python3.11/dist-packages/haystack_integrations/components/connectors/github/repo_forker.py in run(self, url)
    297                 logger.info(f"Creating branch for issue #{issue_number}")
--> 298                 self._create_issue_branch(fork_path, issue_number)
    299 

...

PipelineRuntimeError: The following component failed to run:
Component name: 'repo_forker'
Component type: 'GitHubRepoForker'
Error: 404 Client Error: Not Found for url: https://api.github.com/repos/haystack-demo-user/haystack-core-integrations/git/ref/heads/main

Proposed Changes:

  • Extend _check_fork_status and check that only the forked repo is accessible but also its branches.

How did you test it?

Notes for the reviewer

Checklist

@github-actions github-actions bot added integration:github type:documentation Improvements or additions to documentation labels Jun 12, 2025
@julian-risch julian-risch self-assigned this Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration:github P2 type:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant