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

Adding more checks for team permissions. Adding more ENV variables #4

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

njegosrailic
Copy link
Contributor

main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
Copy link
Owner

@mszostok mszostok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @njegosrailic, thanks for PR!

Review

  • Adding environment variables to be able to run file check and code owners permissions check separately.

    It's a really nice thing. But IMO it will be better to do it in the same fashion as it was implemented e.g. in GolangCI-Lint. Having a separate env variable for each check with true/false is a little overhead. Better will be to have just the CHECKS env variable. If empty then all check enabled. If the user specifies sth, e.g. CHECKS=owners,path then only those two checks are enabled, here is the example how it can be handled in main.go: https://github.com/mszostok/codeowners-validator/compare/check-enabled-disabled?expand=1

FYI

After merging your pull request I will also merge this one: #5, where I've added Duplicated Pattern Checker - you are also welcomed to do the review if you want :). After that, I will create a new release :)

@mszostok mszostok added the enhancement New feature or request label Nov 5, 2019
@mszostok
Copy link
Owner

mszostok commented Nov 6, 2019

@njegosrailic I will also try to check the GitHub GraphQL API and maybe I will be able to replace the rest calls with graphql queries, as a result I will be able to reduce the problems with hitting API GitHub quota.

btw. If you do not have time then we can merge your pull request and I will adjust the selective testing in this pr: #8

@njegosrailic
Copy link
Contributor Author

Hey @mszostok ,

Thank you very much for all the information you provided and suggestions how to improve the code. :) I'll update my PR soon. My apologies but I'm very busy these days.

Also, we are going to try: https://github.com/mszostok/codeowners-validator/compare/check-enabled-disabled?expand=1 for other services not primary for code owners.

I have checked with github support and they have no any official tool to validate code owners.

@mszostok
Copy link
Owner

mszostok commented Nov 11, 2019

I have checked with GitHub support and they have no official tool to validate code owners.

yep, this is true and this was also the reason that I created such a tool. In the upcoming week, I want to do the release and use that officially in Kyma project created by SAP.

so new improvements will come soon

My apologies but I'm very busy these days.

no problem :)

@mszostok
Copy link
Owner

mszostok commented Nov 11, 2019

FYI: CI checks failed because the imports are not sorted

You can execute those checks also locally:
./hack/ci/run-lint.sh
./hack/ci/run-tests.sh

In few days I will update documentation and add developer guide:)

@njegosrailic
Copy link
Contributor Author

FYI: CI checks failed because the imports are not sorted

You can execute those checks also locally:
./hack/ci/run-lint.sh
./hack/ci/run-tests.sh

In few days I will update documentation and add developer guide:)

Actually I accidentally dropped an line. It should be all set. The problem is because I have opened the PR from my forked repo and I did some changes there to be able to compile it. Once you merge the change will drop my fork and migrate config to yours.

@mszostok
Copy link
Owner

mszostok commented Nov 11, 2019

@njegosrailic and what about your feature with checking the user permission? Right now it’s not included in this pr

You want to submit it in separate pr?

@njegosrailic
Copy link
Contributor Author

@njegosrailic and what about your feature with checking the user permission? Right now it’s not included in this pr

You want to submit it in separate pr?

Added that back.

@mszostok mszostok merged commit 4c7a8b1 into mszostok:master Nov 12, 2019
@mszostok
Copy link
Owner

Thanks @njegosrailic for your PR!

The new release with your change is already available on the GitHub: https://github.com/mszostok/codeowners-validator/releases/tag/v0.2.0

Check the release notes for more detailed info 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants