emmeowzing / gitlabci-lint-pre-commit-hook

A pre-commit hook that lints Gitlab CI configurations
https://pypi.org/project/pre-commit-gitlabci-lint/
MIT License
16 stars 3 forks source link

fix!: update the hook to require project-id, fix toml parsing #24

Closed esarmstrong closed 1 year ago

esarmstrong commented 1 year ago

I think I've found that the GitLab API has deprecated the /api/v4/ci/lint endpoint in favor of /api/v4/projects/:projectId/ci/lint, link here. This PR updates the hook script to take in a project ID from the CLI or in the toml file. I also noticed that the toml parsing seems broken, with strings not being read in properly with quotes. I subbed in the toml library to remedy that to ensure that project IDs would be read correctly.

Please let me know thoughts, happy to make updates.

emmeowzing commented 1 year ago

Sorry I didn't see this sooner @esarmstrong ! I'll take a look and merge if all looks well

emmeowzing commented 1 year ago

Looks good to me, just had the one question above.