Skip to content

A GitHub Action for running standard checks and automations on Pull Requests for the n3tuk Organisation

License

Notifications You must be signed in to change notification settings

n3tuk/action-pull-requester

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

n3tuk Pull Request Checker

GitHub go-integrations Workflow Status GitHub codeql Workflow Status GitHub go-releaser Workflow Status Codecov Status

A GitHub Action for running standard checks and automations on pull requests for the n3tuk Organisation.

Usage

You can use the pull-requester GitHub Action in a GitHub Workflow by configuring a YAML file in your GitHub repository (under .github/workflows/pull-requester.yaml), with the following contents:

---
name: Pull Requester

on:
  pull_request:
    types:
      - opened
      - reopened
      - synchronize
      - edited
      - labeled
      - unlabeled
    branches:
      - main
      - master

permissions:
  contents: read
  packages: read
  issues: write
  pull-requests: write

jobs:
  pull-requester:
    runs-on: ubuntu-latest
    name: Check the Pull Request

    concurrency:
      # Ensure that GitHub runs a single concurrent job for any Pull Requester
      # event on any one pull request (i.e. github.event.number), and bias that
      # to the latest job started, which will have access to the latest settings
      group: pull-requester-${{ github.event.number }}
      cancel-in-progress: true

    steps:
      - name: Pull Requester
        uses: n3tuk/action-pull-requester@v1

Note: Do not use the main branch (or any other branch) as a reference for the GitHub Action as the building of binaries for the GitHub Action will be on releases through tagging. This Action downloads those on running, and so nothing but tagged releases will fully run.

Inputs

Name Description Required Type Default
title-minimum The lower bound for the number of characters that the title should contain false int 25
body-split The set of characters which split the body and the pull request template false string ---
body-minimum The lower bound for the number of characters that the body should contain false int 100
label-prefixes A comma-separated list of label prefixes to check for on a pull request false string ''
label-prefix-mode Set if any one prefix, or all label prefixes, must match to pass false string all
auto-assign Set whether to enable auto-assignment of a pull request to the creator false bool true