Coder Social home page Coder Social logo

Comments (10)

iamstarkov avatar iamstarkov commented on June 11, 2024 2

@mszostok nevermind, im a dumbass and forgot to add private key in secrets. thank you again for the help

from codeowners-validator.

mszostok avatar mszostok commented on June 11, 2024

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 becomes INPUT_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.

mszostok avatar mszostok commented on June 11, 2024

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.

allanlewis avatar allanlewis commented on June 11, 2024

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.

mszostok avatar mszostok commented on June 11, 2024

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.

iamstarkov avatar iamstarkov commented on June 11, 2024

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.

mszostok avatar mszostok commented on June 11, 2024

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.

iamstarkov avatar iamstarkov commented on June 11, 2024

I wouldn't classify it as a warning, due to it failing the build haha.

@mszostok thank you

from codeowners-validator.

mszostok avatar mszostok commented on June 11, 2024

@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.

mszostok avatar mszostok commented on June 11, 2024

can you share your job execution?

from codeowners-validator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.