{"id":25543436,"url":"https://github.com/op5dev/require-team-approval","last_synced_at":"2026-02-06T03:30:18.715Z","repository":{"id":277845738,"uuid":"933702806","full_name":"OP5dev/Require-Team-Approval","owner":"OP5dev","description":"Require N number of PR approvals from a GitHub team.","archived":false,"fork":false,"pushed_at":"2025-02-16T15:11:13.000Z","size":8,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-16T15:26:16.563Z","etag":null,"topics":["automation","cicd-pr-validation","devops","github-actions","github-team","pr-review"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OP5dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["rdhar","op5dev"]}},"created_at":"2025-02-16T14:00:16.000Z","updated_at":"2025-02-16T15:03:51.000Z","dependencies_parsed_at":"2025-02-16T15:26:26.075Z","dependency_job_id":"ff2d072c-d0f0-44a4-8edb-07b78dcdfdf7","html_url":"https://github.com/OP5dev/Require-Team-Approval","commit_stats":null,"previous_names":["op5dev/require-team-approval"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OP5dev%2FRequire-Team-Approval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OP5dev%2FRequire-Team-Approval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OP5dev%2FRequire-Team-Approval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OP5dev%2FRequire-Team-Approval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OP5dev","download_url":"https://codeload.github.com/OP5dev/Require-Team-Approval/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239793062,"owners_count":19697893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","cicd-pr-validation","devops","github-actions","github-team","pr-review"],"created_at":"2025-02-20T07:19:19.240Z","updated_at":"2026-02-06T03:30:18.637Z","avatar_url":"https://github.com/OP5dev.png","language":null,"readme":"[![GitHub license](https://img.shields.io/github/license/op5dev/require-team-approval?logo=apache\u0026label=License)](LICENSE \"Apache License 2.0.\")\n[![GitHub release tag](https://img.shields.io/github/v/release/op5dev/require-team-approval?logo=semanticrelease\u0026label=Release)](https://github.com/op5dev/require-team-approval/releases \"View all releases.\")\n*\n[![GitHub repository stargazers](https://img.shields.io/github/stars/op5dev/require-team-approval)](https://github.com/op5dev/require-team-approval \"Become a stargazer.\")\n\n# Require Team Approval\n\nRequire N number of PR approvals from members of a GitHub team. Used to enforce pre-merge PR checks more explicitly than GitHub's native `CODEOWNERS` file.\n\n### View: [Usage Examples](#usage-examples) | [Parameters](#parameters) | [Security](#security) | [Changelog](#changelog) | [License](#license)\n\n\u003c/br\u003e\n\n## Usage Examples\n\n### #1 `pull_request` event requiring 1 approval each from 2 teams\n\nThe bare minimum configuration requires a GitHub access token with 'read:org' scope and the team name whose approval is required. The default number of approvals is set to 1 on the PR which triggered the workflow and can be called multiple times for different teams.\n\n```yaml\non:\n  pull_request:\n\njobs:\n  check:\n    runs-on: ubuntu-latest\n\nsteps:\n  - name: Require DEV team approval\n    uses: op5dev/require-team-approval@v1\n    with:\n      team: dev-team\n      token: ${{ secrets.CI_PAT }}\n\n  - name: Require QA team approval\n    uses: op5dev/require-team-approval@v1\n    with:\n      team: qa-team\n      token: ${{ secrets.CI_PAT }}\n```\n\n\u003c/br\u003e\n\n### #2 `pull_request_review` event requiring 2 approvals with outputs\n\nThis configuration demonstrates a more targeted approach by checking for approvals only when an `approved` review is submitted. The outputs provide detailed information about the approvals, both by the team and the PR in general, for use in subsequent steps as counts or named lists.\n\n```yaml\non:\n  pull_request_review:\n    types: [submitted]\n\njobs:\n  check:\n    if: github.event.review.state == 'approved'\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Require QA team approval x2\n        id: approval\n        uses: op5dev/require-team-approval@v1\n        with:\n          approvals: 2\n          team: qa-team\n          token: ${{ secrets.CI_PAT }}\n\n      - run: |\n          echo \"Got ${{ steps.approval.outputs.team-approvals-count }} / 2 approvals from QA.\"\n          echo \"Got ${{ steps.approval.outputs.pr-approvals-count }} approvals in total.\"\n```\n\n\u003c/br\u003e\n\n## Parameters\n\n### Inputs\n\n| Name                   | Description                                                              |\n| ---------------------- | ------------------------------------------------------------------------ |\n| `team`\u003c/br\u003e(required)  | Team whose approval is required.\u003c/br\u003eExample: `qa-team`                  |\n| `token`\u003c/br\u003e(required) | GitHub access token with 'read:org' scope.\u003c/br\u003eExample: `secrets.CI_PAT` |\n| `approvals`            | Count of approvals required.\u003c/br\u003eDefault: `1`                            |\n| `pr-number`            | Override PR number.\u003c/br\u003eExample: `42`                                    |\n\n\u003c/br\u003e\n\n### Outputs\n\n| Name                   | Description                                              |\n| ---------------------- | -------------------------------------------------------- |\n| `pr-approvals`         | List of approvals on the PR.\u003c/br\u003eExample: `[dev-1,qa-1]` |\n| `pr-approvals-count`   | Count of approvals on the PR.\u003c/br\u003eExample: `1`           |\n| `team-approvals`       | List of approvals from the team.\u003c/br\u003eExample: `[qa-1]`   |\n| `team-approvals-count` | Count of approvals from the team.\u003c/br\u003eExample: `1`       |\n| `team-members`         | List of team members.\u003c/br\u003eExample: `[dev-1,dev-2,dev-3]` |\n| `team-members-count`   | Count of team members.\u003c/br\u003eExample: `1`                  |\n\n\u003c/br\u003e\n\n## Security\n\nView [security policy and reporting instructions](SECURITY.md).\n\n\u003c/br\u003e\n\n## Changelog\n\nView [all notable changes](https://github.com/op5dev/require-team-approval/releases \"Releases.\") to this project in [Keep a Changelog](https://keepachangelog.com \"Keep a Changelog.\") format, which adheres to [Semantic Versioning](https://semver.org \"Semantic Versioning.\").\n\n\u003e [!TIP]\n\u003e\n\u003e All forms of **contribution are very welcome** and deeply appreciated for fostering open-source projects.\n\u003e\n\u003e - [Create a PR](https://github.com/op5dev/require-team-approval/pulls \"Create a pull request.\") to contribute changes you'd like to see.\n\u003e - [Raise an issue](https://github.com/op5dev/require-team-approval/issues \"Raise an issue.\") to propose changes or report unexpected behavior.\n\u003e - [Open a discussion](https://github.com/op5dev/require-team-approval/discussions \"Open a discussion.\") to discuss broader topics or questions.\n\u003e - [Become a stargazer](https://github.com/op5dev/require-team-approval/stargazers \"Become a stargazer.\") if you find this project useful.\n\n\u003c/br\u003e\n\n## License\n\n- This project is licensed under the permissive [Apache License 2.0](LICENSE \"Apache License 2.0.\").\n- All works herein are my own, shared of my own volition, and [contributors](https://github.com/op5dev/require-team-approval/graphs/contributors \"Contributors.\").\n- Copyright 2016-2025 [Rishav Dhar](https://github.com/rdhar \"Rishav Dhar's GitHub profile.\") — All wrongs reserved.\n","funding_links":["https://github.com/sponsors/rdhar","https://github.com/sponsors/op5dev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop5dev%2Frequire-team-approval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fop5dev%2Frequire-team-approval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop5dev%2Frequire-team-approval/lists"}