Skip to content
message-square

GitHub Action

PR Comment with Changes Breakdown

v1.1.2 Latest version

PR Comment with Changes Breakdown

message-square

PR Comment with Changes Breakdown

Comment on PR with a short summary of changes. They are classified according to your config

Installation

Copy and paste the following snippet into your .yml file.

              

- name: PR Comment with Changes Breakdown

uses: lykahb/[email protected]

Learn more about this action in lykahb/pr-comment-changes-breakdown

Choose a version

PR Comment with Changes Breakdown

A breakdown tells reviewer at a glance what the changes are. Does the bulk of them come from the tests or documentation? Is a particular subsystem affected? This heads-up can make a reviewer more motivated, particularly for the larger PRs.

Example usage

- uses: actions/checkout@v3
- uses: lykahb/paths-filter@v2
  id: filter
  with:
    stat: json
    filters: |
      src:
      - 'src/**/*.ts'
      - 'src/**/*.tsx'
      tests:
      - 'test/**'
      documentation:
      - '*.md'
    # or extract filters into a file:
    # filters: .github/group-files.yml
- uses: lykahb/pr-comment-changes-breakdown@v1
  with:
    diff-stat: ${{ steps.filter.outputs.stat }}

With that workflow, a comment for a PR may look like this:

diff

The breakdown only lists the groups that have changed files. And if some files do not fall into any group, they are categorized as "other".

Also see lykahb/paths-filter for the syntax of grouping files.