Comments (10)
@mszostok nevermind, im a dumbass and forgot to add private key in secrets. thank you again for the help
from codeowners-validator.
Hi @allanlewis
Thanks for reporting that. The problem is with your configuration. You used the env
instead of with
.
So it should be:
- name: Run CODEOWNERS validator
uses: mszostok/[email protected]
with:
checks: "owners,duppatterns,syntax"
owner_checker_owners_must_be_teams: "true" # Disallow individual users as owners
github_app_id: ${{ secrets.REDACTED }}
github_app_installation_id: ${{ secrets.REDACTED }}
github_app_private_key: ${{ secrets.REDACTED }}
If you still want to use envs, I described it here:
If you want to use environment variables anyway, you must add the
INPUT_
prefix to each environment variable. For example,OWNER_CHECKER_IGNORED_OWNERS
becomesINPUT_OWNER_CHECKER_IGNORED_OWNERS
.
so in this case it would be:
- name: Run CODEOWNERS validator
uses: mszostok/[email protected]
with:
checks: "owners,duppatterns,syntax"
owner_checker_owners_must_be_teams: "true" # Disallow individual users as owners
env:
INPUT_GITHUB_APP_ID: ${{ secrets.REDACTED }}
INPUT_GITHUB_APP_INSTALLATION_ID: ${{ secrets.REDACTED }}
INPUT_GITHUB_APP_PRIVATE_KEY: ${{ secrets.REDACTED }}
However, I will adjust the documentation to make it more straight forward, to just copy-paste what needed.
from codeowners-validator.
Let me know whether is more readable now :)
https://github.com/mszostok/codeowners-validator/blob/main/docs/gh-auth.md#github-app
from codeowners-validator.
Thanks, @mszostok - the reason I was trying to use env vars was that the app authentication parameters weren't listed in action.yml
. I see that you've addressed that in ccda6cc - are you intending to make a new release in the near future?
from codeowners-validator.
Not sure about that as I want to release it with at least one new feature. However you can use it in that way without the release. You will just see the notice about missing props but the action will work properly 👍
See: https://github.com/GitHubCODEOWNERS/codeowners-samples/actions/runs/2655128900
from codeowners-validator.
im having the similar issue, I configured the actions in this way:
- uses: mszostok/[email protected]
with:
github_app_id: 'REDACTED'
github_app_installation_id: 'REDACTED'
github_app_private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
checks: "files,owners,duppatterns,syntax"
experimental_checks: "notowned,avoid-shadowing"
and I got this output where action complains that documented required fields are not expected.
$ Run mszostok/[email protected]
Warning: Unexpected input(s) 'github_app_id', 'github_app_installation_id', 'github_app_private_key', valid inputs are ['entryPoint', 'args', 'github_access_token', 'github_base_url', 'github_upload_url', 'experimental_checks', 'checks', 'repository_path', 'check_failure_level', 'not_owned_checker_skip_patterns', 'owner_checker_repository', 'owner_checker_ignored_owners', 'owner_checker_allow_unowned_patterns', 'owner_checker_owners_must_be_teams', 'not_owned_checker_subdirectories', 'not_owned_checker_trust_workspace']
am I missing something?
from codeowners-validator.
Hi @iamstarkov,
For 0.7.4
you will see this warning. However, the validator will work properly, the warning will disappear in 0.7.5
.
I will cut a new release this week 👍
from codeowners-validator.
I wouldn't classify it as a warning, due to it failing the build haha.
@mszostok thank you
from codeowners-validator.
@iamstarkov are you sure? I tested that and the build was not failing, see: https://github.com/GitHubCODEOWNERS/codeowners-samples/actions/runs/2655128900
from codeowners-validator.
can you share your job execution?
from codeowners-validator.
Related Issues (20)
- /folder/* wildcard pattern is assumed to be nested by the action "Not Owned" check, which it isnt HOT 1
- CODEOWNERS file existence check HOT 1
- Unnecessary failure of test of GitHub token
- Killed: 9 HOT 8
- Error and mismatched URLs when using github app credentials via github enterprise
- Add support for specifically excluding code owners on files and subfolders HOT 1
- Recommended App permissions don't appear to be sufficient
- codeowners-validator install.sh crit-platform error for linux/arm64
- Print a list of all files and their owners HOT 1
- Owner child team is not supported by codeowners-validator
- Executing File Exist Checker Not support glob
- Feature request: fail for deleted files that are explicitly owned in CODEOWNERS HOT 4
- Support Gitea codeowners
- Runtime Error: segmentation fault codeowners-validator HOT 2
- Support fine-grained PATs
- How to exclude bots such as dependabot?
- Omitting an owner should not fail codeowners-validator HOT 1
- Does not support validating Enterprise SSO users HOT 1
- Abandoned Action? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeowners-validator.