Skip to content

christianncode/pr-total-changes

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

PR Total Changes

Get a summary of the total number of changes (additions and deletions) in a pull request, and automatically comment on the PR with the results.

Features

  • Calculates lines added, removed, and total changes in a PR.
  • Comments a summary table on the pull request.
  • Warns if the PR exceeds the configured total changes limit.

Usage

Add the following step to your workflow:

- name: PR Total Changes
  uses: christianncode/pr-total-changes@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}
    # total_limit: 500

Inputs

Name Description Required Default
github_token GitHub token with read access to the repository true
total_limit Total number of changes to consider for the PR false 500

Example Output

The action will comment something like:

### 📊 Code Changes Summary
| Lines Added | Lines Removed | Total Changes |
|-------------|---------------|---------------|
| 123         | 45           | 168          |

### ➡️ Configurations (Inputs)
| Total Limit |
|-------------|
| 500         |

✅ **The PR is within the acceptable limit.**

If the limit is exceeded:

❌ **Too many changes! The PR exceeds the limit of 500 lines.**

License

MIT


Made with ❤️ by Christian Díaz

About

Get a summary of the total number of changes in a pull request

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published