Skip to content
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

GitLab Connector: hard-coded master branch makes a 404 error #3764

Open
ThomaciousD opened this issue Jan 24, 2025 · 1 comment
Open

GitLab Connector: hard-coded master branch makes a 404 error #3764

ThomaciousD opened this issue Jan 24, 2025 · 1 comment

Comments

@ThomaciousD
Copy link
Contributor

The current implementation of the Onyx GitLab connector assumes the branch name to be master when accessing repository files. This assumption causes 404 errors when working with repositories that use a different default branch name, such as main or other custom branch names.

The issue specifically arises in the following part of the code:

file_path=file["path"], ref="master"

This causes the API calls to fail when the repository does not have a master branch.

ThomaciousD added a commit to ThomaciousD/onyx that referenced this issue Jan 24, 2025
@rkuo-danswer
Copy link
Contributor

Hi ... is it possible to put in a connector test that exercises both the happy and not happy paths for this?

I tried running main (without this PR) against against a random gitlab project without a master default branch, but the connector actually appeared to work (https://gitlab.com/snakster/default-branch-test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants