mszostok / codeowners-validator

The GitHub CODEOWNERS file validator
Apache License 2.0
217 stars 47 forks source link

Feature request: support custom GitHub URLs #1

Closed ccnokes closed 5 years ago

ccnokes commented 5 years ago

I'd like to use this against my company's internal enterprise github instance, but it looks like api.github.com is hardcoded in. It'd be great if I could pass a github URL in as an env param. This is a really useful package btw, thanks 👍

mszostok commented 5 years ago

Hi @ccnokes, thanks for reporting the issue!

I totally agree with your feature request, so I will add it at the end of the day:)

Cheers, Mateusz

mszostok commented 5 years ago

Hi @ccnokes,

Describe functionality was implemented. Right now u can pass your own GitHub URL by setting GITHUB_BASE_URL.

I tested that with our private enterprise GitHub. Basically you need to execute such command:

env REPOSITORY_PATH="abc/commercialization" GITHUB_BASE_URL="https://github.abc.corp/api/v3" VALID_OWNER_CHECKER_ORGANIZATION_NAME="org" ./codeowners-validator

I also created the first release with binaries that you can download: https://github.com/mszostok/codeowners-validator/releases

so having Go on your host is no longer required.

If the repo license is not acceptable for you then we can discuss that :)

ccnokes commented 5 years ago

🎉 Thank you so much! I really appreciate the binaries too -- now this is easy to integrate into our build or a git hook 👍