mszostok / codeowners-validator

The GitHub CODEOWNERS file validator
Apache License 2.0
212 stars 48 forks source link

Unnecessary failure of test of GitHub token #173

Open Nuru opened 1 year ago

Nuru commented 1 year ago

Using v0.7.1 with our PAT, the checks succeed. Using v0.7.4 they fail with:

 level=fatal msg="while checking if 'owners' checker is satisfied: missing scopes: \"read:org\""

Obviously the token has the permissions is needs, and it is configured with read:org scope, so I don't know why it is failing.

This works:

    - uses: mszostok/codeowners-validator@v0.7.1
      name: "Full check of CODEOWNERS"
      with:
        checks: "syntax,owners,duppatterns"
        owner_checker_allow_unowned_patterns: "false"
        # GitHub access token is required only if the `owners` check is enabled
        github_access_token: "${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}"

changing 0.7.1 to 0.7.4 fails with the above error.