{"id":29210666,"url":"https://github.com/embarkstudios/action-auto-review-by-label","last_synced_at":"2025-07-02T21:07:29.454Z","repository":{"id":137922172,"uuid":"609243506","full_name":"EmbarkStudios/action-auto-review-by-label","owner":"EmbarkStudios","description":"Simple github action to add a bot review in the presence of a label. Useful for getting merge rules to play nice with other CI software. ","archived":false,"fork":false,"pushed_at":"2024-08-12T13:44:08.000Z","size":475,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-08-13T13:17:10.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmbarkStudios.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-03T17:15:47.000Z","updated_at":"2024-08-12T13:44:11.000Z","dependencies_parsed_at":"2023-11-28T14:28:24.906Z","dependency_job_id":"759a10dc-26e4-4db9-b6db-508be961a122","html_url":"https://github.com/EmbarkStudios/action-auto-review-by-label","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"EmbarkStudios/opensource-template","purl":"pkg:github/EmbarkStudios/action-auto-review-by-label","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Faction-auto-review-by-label","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Faction-auto-review-by-label/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Faction-auto-review-by-label/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Faction-auto-review-by-label/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmbarkStudios","download_url":"https://codeload.github.com/EmbarkStudios/action-auto-review-by-label/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbarkStudios%2Faction-auto-review-by-label/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263215298,"owners_count":23431895,"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":[],"created_at":"2025-07-02T21:07:28.233Z","updated_at":"2025-07-02T21:07:29.439Z","avatar_url":"https://github.com/EmbarkStudios.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Allow this file to not have a first line heading --\u003e\n\u003c!-- markdownlint-disable-file MD041 no-emphasis-as-heading --\u003e\n\n\u003c!-- inline html --\u003e\n\u003c!-- markdownlint-disable-file MD033 --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# `➡️ Auto Review by Label`\n\n\u003c!--- FIXME: Update crate, repo and CI workflow names here! Remove any that are not relevant ---\u003e\n[![Build Status](https://github.com/EmbarkStudios/action-auto-review-by-label/workflows/test/badge.svg)](https://github.com/EmbarkStudios/action-auto-review-by-label/actions?workflow=test)\n[![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev)\n\u003c/div\u003e\n\nA small utility action that automatically adds a bot review in the presence of a selected label.\n\n## Usage\n\nCreate a new `.github/workflows/approve-by-label.yml` file:\n\n```yaml\nname: approve-by-label\non:\n  pull_request:\n    types: [labeled, unlabeled]\njobs:\n  test:\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: actions/setup-node@v1\n      - uses: EmbarkStudios/action-auto-review-by-label\n        with:\n          github-token: ${{ secrets.BOT_TOKEN }}\n          bot-username: thefuntastic\n          label-name: skip-review\n```\n\nThe following options are required:\n\n- `github-token`: Personal access token for the account performing reviews. Note that the built-in github actions token does not have permission for review approval, so a new token must be generated. For details on generating a new token, see the [offical guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).\n- `bot-username`: Username of the account associated with the token - is used to detect existing reviews. Will result in review approval spam if misconfigured.\n- `label-name`: Name of the label intended to trigger auto-approval.\n\n## Limitations\n\nRemoving the chosen label doesn't remove the review from the PR. This is because once github records a positive review, dismissing it only converts it back to a pending review.\n\nA pending review can interfere with merge rules that require all approvals to be green. So instead we leave the review in place, requiring human users to manually intervene if necessary. \n\n## Maintenance\n\nThis project uses node, typescript and yarn as a package manager. These are common web technologies, but if you're getting started you will need to install node and yarn. \n\n```\nyarn install\n```\n\nWill initialize the project and download dependencies\n\nNow you should be able to call various yarn commands as defined in `package.json`, but the important will be:\n\n```\nyarn test \nyarn dist\n```\n\n`yarn dist` is necessary to update `dist/index.js`, which is the actual output used by the github action. The workflow `.github/workflows/publish.yml` should call these in case you forget.\n\nGenerally speaking the unit tests try to mock up the data as receieved from Github. However, if you want to execute in a live environment, you can do so by first creating a branch on this repository, eg `testing`. You can then open a branch on your target repository, and modify the workflow file to point to this branch, i.e. \n\n```\n - uses: EmbarkStudios/action-auto-review-by-label@testing\n```\nThis should allow you to trigger live CI, but without having to push to main on either repo\n\n## Contributing\n\n[![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\nWe welcome community contributions to this project.\n\nPlease read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started.\nPlease also read our [Contributor Terms](CONTRIBUTING.md#contributor-terms) before you make any contributions.\n\nAny contribution intentionally submitted for inclusion in an Embark Studios project, shall comply with the Rust standard licensing model (MIT OR Apache 2.0) and therefore be dual licensed as described below, without any additional terms or conditions:\n\n### License\n\nThis contribution is dual licensed under EITHER OF\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\nFor clarity, \"your\" refers to Embark or any other licensee/user of the contribution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembarkstudios%2Faction-auto-review-by-label","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembarkstudios%2Faction-auto-review-by-label","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembarkstudios%2Faction-auto-review-by-label/lists"}