Skip to content

Calculate simple PR statistics in your repository using GitHub Actions

Notifications You must be signed in to change notification settings

akwodkiewicz/simple-pr-stats

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          labels_to_ignore: label with spaces, release