-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[GithubLastCommit] [GitlabLastCommit] [GiteaLastCommit] Support file path for last commit #10041
Conversation
|
50ca478
to
1d6801d
Compare
🚀 Updated review app: https://pr-10041-badges-shields.fly.dev |
Thanks. This looks good, but I think we could do with improving the error handling/messages slightly. On the GitLab and GitHub APIs, if we specify a path that doesn't exist, we get back an empty array. This means the response fails schema validation. With the Gitea API, if the path doesn't exist, we get a 404 back and throw the error "user or repo not found". I think for this case, we can just amend the error message to "user, repo or path not found" We should also have test cases for the errors. |
Co-authored-by: chris48s <[email protected]>
Just looking over your other similar PR for bitbucket, you've already adopted the same pattern I described for the error handling there 👍 |
@chris48s I've made the suggested changes - tests are passing locally so not sure why they are failing in CI (can't see from the log). |
🚀 Updated review app: https://pr-10041-badges-shields.fly.dev |
Thanks. This looks good. Looks like the test failures were just a transient failure with some requests timing out. |
Closes #7351
Adds support to resolve last commit for a given file path, for GitHub, GitLab and Gitea services.