https://github.com/akwodkiewicz/simple-pr-stats
Calculate simple PR statistics in your repository using GitHub Actions
https://github.com/akwodkiewicz/simple-pr-stats
github-actions pull-requests simple statistics
Last synced: about 1 month ago
JSON representation
Calculate simple PR statistics in your repository using GitHub Actions
- Host: GitHub
- URL: https://github.com/akwodkiewicz/simple-pr-stats
- Owner: akwodkiewicz
- Created: 2022-03-30T20:13:39.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-02T14:24:52.000Z (about 4 years ago)
- Last Synced: 2026-04-28T04:04:59.928Z (about 2 months ago)
- Topics: github-actions, pull-requests, simple, statistics
- Language: TypeScript
- Homepage:
- Size: 8.19 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple-pr-stats
Calculate simple PR statistics in your repository.
## Output
The stats contain:
- average time of PR completion
- minimum time of PR completion (with a link to the PR)
- maximum time of PR completion (with a link to the PR)
The information is shown as workflow run annotations in the _Actions_ tab and (optionally) in the _Pull Request_ view (if a `pull_request` trigger was chosen to run the action).
## Inputs
### `token`
**Required** Your workflow `GITHUB_TOKEN`, allowing access to GitHub API
### `labels_to_ignore`
Comma-delimited list of labels to ignore.
The stats will ignore all the PRs that are marked with any of the provided labels.
### `days_back`
The stats will only include PRs between the date `days_back` days ago and now. Does **not** have to be an integer.
Default: 30
### `include_drafts`
If set to `true`, the stats will include draft PRs.
Default: `false`
## Example usage
```
on:
schedule:
- cron: '0 8 * * *'
jobs:
calculate-stats:
runs-on: ubuntu-latest
steps:
- name: Run simple-pr-stats
uses: akwodkiewicz/simple-pr-stats@v0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels_to_ignore: label with spaces, release
```