Closed nitrocode closed 3 years ago
Hi @nitrocode
Thanks for reporting that. It's a problem with workflow syntax. You need to define it as action argument, not enviromnet variable, see:
name: Validate Codeowners
on:
pull_request:
jobs:
validate-codeowners:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code at current commit"
uses: actions/checkout@v2
- uses: mszostok/codeowners-validator@v0.6.0
with:
checks: "syntax,owners,duppatterns"
github_access_token: "${{ secrets.CODE_OWNER_VALIDATION }}"
owner_checker_ignored_owners: "@user1,@user2,@user3" # you need to define them as action argument
The codeowners validator can be used directly as binary e.g. locally or on other CI system and also as GitHub Action.
When it is used as a GitHub action, the configuration needs to be specified as action arguments. This is the preferred way. You can also use the env variable but then you need to add INPUT_
prefix which GitHub adds by default, so on GitHub action OWNER_CHECKER_IGNORED_OWNERS
becomes INPUT_OWNER_CHECKER_IGNORED_OWNERS
.
I will update GitHub action documentation to make it clear also for others.
Cheers!
[NOTE] relates to: https://github.com/mszostok/codeowners-validator/issues/73
Description
We have multiple outside contributors added to a github org repo. The github org does not contain the outside contributors and so complains even tho we have
OWNER_CHECKER_IGNORED_OWNERS
set.Expected result
It should ignore the users that are outside contributors.
Actual result
Steps to reproduce
.github/CODEOWNERS
.github/workflows/validate-codeowners.yml
Troubleshooting
Tried
OWNER_CHECKER_IGNORED_OWNERS
What are some ways around this besides disabling the
owners
check ?