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

Fix initialization of GitLab repos #298

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented Jul 30, 2024

GitLab returns 404 on a repository/tree call if the repo has zero commits. We checked against the error message but the client library started to return a static 404 error which makes our check fail.

This commit changes the checking logic to check for the clients static ErrNotFound error. This might catch other errors too (repo does not exists at all), but those errors will be caught in the next step.

Checklist

  • Keep pull requests small so they can be easily reviewed.
  • Update the documentation.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog

GitLab returns `404` on a `repository/tree` call if the repo has zero commits.
We checked against the error message but the client library started to return a static `404` error which makes our check fail.

This commit changes the checking logic to check for the clients static `ErrNotFound` error. This might catch other errors too (repo does not exists at all), but those errors will be caught in the next step.
@bastjan bastjan added the bug Something isn't working label Jul 30, 2024
@bastjan bastjan requested a review from a team July 30, 2024 10:17
@bastjan bastjan merged commit dfd7675 into master Jul 30, 2024
6 checks passed
@bastjan bastjan deleted the fix-creation-of-new-gitlab-gitrepos branch July 30, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants