DSACMS / repo-scaffolder

Templates and commandline tools for creating repositories for US Federal open source projects
Creative Commons Zero v1.0 Universal
21 stars 8 forks source link

checks.yml repo linter requires token #116

Open JosephGasiorekUSDS opened 1 month ago

JosephGasiorekUSDS commented 1 month ago

Issue Report

module-name: checks.yml repo linter requires token

Expected behavior

To be able to run the repo-scaffolder setup procedure for existing repos and have the checks work.

Actual behavior

The checks.yml workflow is set to run on pull requests. It then runs the newrelic/repolinter-action@v1 action with the output_type configuration set to issue instead of exit-code. The repolinter-action configuration requires a token value to be set with a valid Github Personal access token.

Steps to reproduce the behavior

Run the steps on an existing repo and and the checks won't pass. In my case the error message was:

Error: A fatal error was thrown.
Error: Octokit API call failed. This may be due to your token permissions or an issue with the GitHub API. If the error persists, feel free to open an issue.
Error: GET https://api.github.com/repos/XXXXX/XXXX/issues?creator=app%2Fgithub-actions&labels=cms-oss-tier4&state=all&sort=created&direction=desc returned status 403

I filed an issue instead of a PR as I was unsure of the preferred solution. Possible solutions include: