https://github.com/rpidanny/gha-pr-nudger
A Github Action that nudges the PR participants to get the PR merged by commenting a reminder message on PRs.
https://github.com/rpidanny/gha-pr-nudger
github github-actions typescript
Last synced: 9 months ago
JSON representation
A Github Action that nudges the PR participants to get the PR merged by commenting a reminder message on PRs.
- Host: GitHub
- URL: https://github.com/rpidanny/gha-pr-nudger
- Owner: rpidanny
- License: mit
- Created: 2021-04-10T11:22:23.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T19:58:51.000Z (almost 3 years ago)
- Last Synced: 2025-08-30T00:55:44.897Z (9 months ago)
- Topics: github, github-actions, typescript
- Language: TypeScript
- Homepage: https://github.com/marketplace/actions/pr-nudger
- Size: 1.58 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Pull Request Nudger
This action [nudges](https://en.wikipedia.org/wiki/Nudge_theory) the PR participants to get the PR merged by commenting a reminder message on PRs that are older than `x` number of days.
## Why PR Nudger?
This action is especially useful to help follow the principle or [short-lived-branches](https://trunkbaseddevelopment.com/short-lived-feature-branches/).
> One key rule is the length of life of the branch before it gets merged and deleted. Simply put, the branch should only last a couple of days. Any longer than two days, and there is a risk of the branch becoming a long-lived feature branch (the antithesis of trunk-based development).
The core idea is that we should not enforce a strict rule but just [nudge](https://en.wikipedia.org/wiki/Nudge_theory) the participants to follow best practices.
## Usage
```yaml
jobs:
Nudge:
runs-on: ubuntu-latest
permissions:
pull-requests: 'write'
steps:
- uses: rpidanny/gha-pr-nudger@v1
with:
# Repository name with owner. For example, rpidanny/gha-pr-nudger
# Default: ${{ github.repository }}
repository: ''
# Personal access token (PAT) used to call GitHub APIs
#
# Default: ${{ github.token }}
token: ''
# The number of days after which the PR is marked as older
# and the nudging should begin
# Default: 2
days: ''
# The message to post to nudge the PR
# The message can be a template where {days} can be used
# to dynamically set the age of the PR
# Default:
# Hey there :wave:, this PR has been open for **{days}** day(s).
#
# In the spirit for [short lived branches](https://trunkbaseddevelopment.com/short-lived-feature-branches/), let's get this merged soon :rocket:
message: ''
# Whether to include Dependabot PRs
# Default: true
includeDependabot: ''
```
## License
The scripts and documentation in this project are released under the [MIT License](LICENSE)