Skip to content

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.

License

MIT and 2 other licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

EmbarkStudios/action-auto-review-by-label

➡️ Auto Review by Label

Build Status Embark

A small utility action that automatically adds a bot review in the presence of a selected label.

Usage

Create a new .github/workflows/approve-by-label.yml file:

name: approve-by-label
on:
  pull_request:
    types: [labeled, unlabeled]
jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/setup-node@v1
      - uses: EmbarkStudios/action-auto-review-by-label
        with:
          github-token: ${{ secrets.BOT_TOKEN }}
          bot-username: thefuntastic
          label-name: skip-review

The following options are required:

  • 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.
  • bot-username: Username of the account associated with the token - is used to detect existing reviews. Will result in review approval spam if misconfigured.
  • label-name: Name of the label intended to trigger auto-approval.

Limitations

Removing 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.

A 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.

Contributing

Contributor Covenant

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started. Please also read our Contributor Terms before you make any contributions.

Any 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:

License

This contribution is dual licensed under EITHER OF

at your option.

For clarity, "your" refers to Embark or any other licensee/user of the contribution.

About

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.

Resources

License

MIT and 2 other licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published