Check for GitHub Actions workflow runs which are awaiting approval.
From https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks
workflows on pull requests are not run automatically if they are received from first-time contributors, and must be approved first
This policy puts a large burden on repository maintainers. Even with an active maintainer, it can introduce significant delays in the important feedback cycle between contributors and the CI system. The first time PRs targeted by the system are often the very ones that benefit the most from an automated validation system. It can be easy for maintainers to overlook that each push to a PR necessitates another approval.
For this reason, it's useful to have a tool to monitor repositories for unapproved workflows.
Required tools:
Run the following from the project's root folder to install the Python module dependencies:
poetry install
poetry run python workflowsawaiting.py [OPTION]... CONFIG_PATH
Required
Path to a YAML formatted file defining the repositories to monitor workflows in.
See the Configuration file section for details on the file format.
Optional
Path to output a JSON format report of the results to.
Optional
Output debug information.
Required
GitHub access token to use for the GitHub API requests.
The repositories to monitor workflows in are defined by a YAML formatted file.
It is a list of configuration objects, which support the following keys:
Repository owner. If an owner, the configuration applies to all that owner's repositories, though subsequent configuration objects can modify that list.
Repository name. If no repo
is specified by a configuration object, the action
is applied to all the owner's repositories which are in the scope
, though subsequent configuration objects can modify that list.
Supported values:
monitor
(default)ignore
Supported values:
maintaining
: (default) monitor only repositories where the owner ofGITHUB_TOKEN
has permissions.all
: monitor all repositories