banjtheman / prfaq_action

Create a PRFAQ for merged pull requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pull Request FAQs

A GitHub Workflow that automatically answers the following questions on closed/merged Pull Requests.

  1. How long was PR open?

  2. Who contributed to the PR?

  3. What files changed in the PR?

  4. How many lines of code changed in the PR?

Workflow

The following highlights how this workflow works.

  1. When a pull request is closed, the workflow is started.
  2. The workflow downloads the repo using the GitHub Action actions/checkout@v2
  3. The workflow uses the GitHub GraphQL API using the template query to get data on the pull request using the GitHub Action helaili/github-graphql-action@2.0.1
  4. The workflow saves the output as a JSON file
  5. The workflow uses the jannekem/run-python-script-action@v1 to parse the JSON file to set answers to the questions as environment variables
  6. The workflow uses the chuhlomin/render-template@v1.2 to set the answers into the PRFAQs template
  7. The workflow uses the peter-evans/create-or-update-comment@v1 to post the answers as a comment on the Pull Request

Example

The following image is an example from here

image

About

Create a PRFAQ for merged pull requests

License:MIT License