skymoore/Required Approvals
Checks if the required codeowners have approved a PR and requires a minimum number of approvals
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| token | GitHub token | yes | — |
| read_org_scoped_token | GitHub token with read:org scope | yes | — |
| org_name | Organization name | yes | — |
| min_approvals | Minimum number of approvals | yes | — |
| pr_number | Pull request number, mutually exclusive with branch, will check approvals on this PR if supplied. If not supplied, will check approvals on the PR that triggered the workflow. If both pr_number and branch are supplied it will default to the latest pr on the branch. | no | — |
| branch | Branch name, mutually exclusive with pr_number, will look for prs from this branch if supplied, and select the newest one if there are multiple. If not supplied, will check approvals on the PR that triggered the workflow. If both pr_number and branch are supplied it will default to the latest pr on the branch. | no | — |
| require_all_approvals_latest_commit | Require all approvals to be on the latest commit of the PR, ignore approvals on previous commits. | no | true |
| limit_org_teams_to_codeowners_file | Enable to limit a user's team membership check to only those specified in the CODEOWNERS file. This overrides the default behavior of checking all teams in the organization 'org_name'. Consider enabling for environments with a large number of teams to reduce execution time. | no | false |
| approval_mode | Determines the approval requirement for codeowners. If set to "ALL", all codeowners must approve. If set to "ANY", at least one approval from a codeowner is sufficient. If not provided, the default is "ALL". | no | ALL |
Outputs
| name | description |
|---|---|
| approved | True if all required approvals are met, false otherwise |
| reason | Human-readable explanation of why the approval requirements were or were not met |