kadrach/pre-commit-gitlabci-lint

Need to change path to lint API

ofalk opened this issue · 3 comments

ofalk commented

Reference:

url = urljoin(base_url, "/api/v4/ci/lint")

The lint API endpoint is now available under the specific project:
https://docs.gitlab.com/ee/api/lint.html

So this should look more like:

url = urljoin(base_url, "/api/v4/projects/:id/ci/lint")

Where id is either the project id or the urlencoded project name; ie. <user_or_group>%2F<project_name>.

I'm not sure if the project id or project name can be easily (automatically) obtained, I think it would be fair to add this as an additional parameter - or just provide the full URL - either way would be fine IMHO.

@ofalk This repo is stale for quite some time now. I forked it and implemented your suggestion: https://github.com/frerksaxen/pre-commit-gitlabci-lint

Pull requests are always welcome :)

ofalk commented

@frerksaxen thanks for the information that this has been addressed in your repo already. Maybe follow @kadrach advise and provide a PR? I think more and more people will fall into this "trap" and if the main repo has the fix, it would be beneficial for everyone, isn't it?
I mean, I could also clone and provide the PR, but if you have it ready already @frerksaxen, I guess it's not too much effort, is it?