Giter Club home page Giter Club logo

reviewed-by-trailer-action's Introduction

reviewed-by-trailer-action

This GitHub Action will automatically append a Reviewed-by: trailer to the body of a pull_request when a review is completed. This can then be used with git shortlog -ns --group=trailer:reviewed-by to see who is reviewing the most pull requests.

To use this action, you must always Squash and Merge pull requests, using the body of the PR as the commit message for the squashed commit.

Usage

Create the following file at .github/workflows/pull_request_review-trailer.yml:

name: PR Review
on: pull_request_review
jobs:
  review:
    name: Reviewed-by Trailer
    runs-on: ubuntu-latest
    steps:
      - name: Debug
        uses: mheap/reviewed-by-trailer-action@v1
        env:
          GITHUB_TOKEN: ${{ secrets.PAT }}
        with:
          states: approved,changed_requested

You will need to add a GitHub API token as a secret named PAT to use this action. The GITHUB_TOKEN available in the environment does not have enough permissions to fetch the data we need to populate the user name and email address in the trailer.

Configuration

This action accepts a comma-separated states input to control which events trigger Reviewed-by to be added. The available states are:

  • approved
  • changes_requested
  • commented

The default value for this field is approved, which means that only approving reviews will be added. The example above enables the action for both approved and changes_requested

reviewed-by-trailer-action's People

Contributors

mheap avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.