All Projects → neofinancial → ticket-check-action

neofinancial / ticket-check-action

Licence: MIT license
Verify that pull request titles start with a ticket ID

Programming Languages

typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to ticket-check-action

gajira
GitHub Actions for Jira
Stars: ✭ 100 (+244.83%)
Mutual labels:  jira, github-action
postee
Simple message routing system that receives input messages through a webhook interface and can enforce actions using predefined outputs via integrations.
Stars: ✭ 160 (+451.72%)
Mutual labels:  jira
github-action-publish-binaries
Publish binaries when new releases are made.
Stars: ✭ 123 (+324.14%)
Mutual labels:  github-action
slsa-provenance-action
Github Action implementation of SLSA Provenance Generation
Stars: ✭ 34 (+17.24%)
Mutual labels:  github-action
migu-sign
咪咕爱看签到获流量话费,通过 github action 来实现自动签到。
Stars: ✭ 20 (-31.03%)
Mutual labels:  github-action
github-action-wpe-site-deploy
A GitHub Action to deploy code directly to WP Engine.
Stars: ✭ 116 (+300%)
Mutual labels:  github-action
Performance-Engineers-Clubhouse
Join Performance Engineers Clubhouse 🏡
Stars: ✭ 14 (-51.72%)
Mutual labels:  clubhouse
jira-sprint-reporting
Reporting in a Google Sheet on a Sprint level using JIRA REST API
Stars: ✭ 25 (-13.79%)
Mutual labels:  jira
ticketutil
Python ticketing utility for working with tickets in popular tools
Stars: ✭ 58 (+100%)
Mutual labels:  jira
Confluence-and-Jira
Docker部署并破解Jira、Confluence及相关插件;若图片加载不出来可以访问我的博客原文查看
Stars: ✭ 60 (+106.9%)
Mutual labels:  jira
vscode-confluence-markup
Visual Studio Code extension for Confluence® markup
Stars: ✭ 21 (-27.59%)
Mutual labels:  jira
setup-bats
GitHub Action to setup BATS testing framework
Stars: ✭ 25 (-13.79%)
Mutual labels:  github-action
aws-assume-role
GitHub action to assume subsequent AWS roles
Stars: ✭ 22 (-24.14%)
Mutual labels:  github-action
Jira-Lens
Fast and customizable vulnerability scanner For JIRA written in Python
Stars: ✭ 185 (+537.93%)
Mutual labels:  jira
mpv-winbuild
Use Github Action to build mpv for Windows with latest commit.
Stars: ✭ 78 (+168.97%)
Mutual labels:  github-action
jira scan
A simple remote scanner for Atlassian Jira
Stars: ✭ 89 (+206.9%)
Mutual labels:  jira
LOCKLEVEL
A prototype that demonstrates a method for scoring how well Windows systems have implemented some of the top 10 Information Assurance mitigation strategies. #nsacyber
Stars: ✭ 98 (+237.93%)
Mutual labels:  compliance
awesome-clubhouse
A list of useful tools (apis, links, services etc.) for clubhouse users
Stars: ✭ 35 (+20.69%)
Mutual labels:  clubhouse
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+2427.59%)
Mutual labels:  github-action
find-comment
A GitHub action to find an issue or pull request comment
Stars: ✭ 81 (+179.31%)
Mutual labels:  github-action

Pull Request Ticket Check Action

Build status

Verify that pull request titles start with a ticket ID

Overview

This Github Action helps ensure that all pull requests have an associated ticket ID in their title.

It can detect the ID in the title of the pull request, in the branch name, whether a reference ID (#123) is in the body, or even if a full URL is in the body.

If no ticket/issue ID is in the title, it will extract the ID from the branch or body and update the title for you. It will fail the check if no ticket ID is found anywhere.

If a ticketLink input is provided and named groups (?<ticketNumber>) are used in regexes, a ticket link will be posted on a PR upon a successful match. This overrides the quiet option.

Usage

In your .github/workflows folder, create a new pull_request_linting.yml file with the respective contents based on your needs.

The examples provided require some customizations unique to your codebase or issue tracking. If you're unfamiliar with building a regex, check out Regexr.

Make sure you check for the following to swap out with your values:

  • :owner / :org - used in all examples
  • :repo - used only in the GitHub example

Examples

GitHub

name: Pull Request Lint

on:
  pull_request:
    types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
  title:
    name: ticket check
    runs-on: ubuntu-latest

    steps:
      - name: Check for ticket
        uses: neofinancial/ticket-check-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          ticketLink: 'https://github.com/:owner/:repo/issues/%ticketNumber%'
          ticketPrefix: '#'
          titleRegex: '^#(?<ticketNumber>\d+)'
          branchRegex: '^(?<ticketNumber>\d+)'
          bodyRegex: '#(?<ticketNumber>\d+)'
          bodyURLRegex: 'http(s?):\/\/(github.com)(\/:owner)(\/:repo)(\/issues)\/(?<ticketNumber>\d+)'

Jira

name: Pull Request Lint

on:
  pull_request:
    types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
  title:
    name: ticket check
    runs-on: ubuntu-latest

    steps:
      - name: Check for ticket
        uses: neofinancial/ticket-check-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          ticketLink: 'https://:org.atlassian.net/browse/PROJ-%ticketNumber%'
          ticketPrefix: 'PROJ-'
          titleRegex: '^PROJ-(?<ticketNumber>\d+)'
          branchRegex: '^PROJ-(?<ticketNumber>\d+)'
          bodyRegex: 'PROJ-(?<ticketNumber>\d+)'
          bodyURLRegex: 'http(s?):\/\/(:org.atlassian.net)(\/browse)\/(PROJ\-)(?<ticketNumber>\d+)'

Shortcut (formerly Clubhouse)

name: Pull Request Lint

on:
  pull_request:
    types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
  title:
    name: ticket check
    runs-on: ubuntu-latest

    steps:
      - name: Check for ticket
        uses: neofinancial/ticket-check-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          ticketLink: 'https://app.shortcut.com/:org/story/%ticketNumber%'
          ticketPrefix: 'SC-'
          titleRegex: '^(CH|sc)(-?)(?<ticketNumber>\d+)'
          branchRegex: '^(CH|sc)(-?)(?<ticketNumber>\d+)'
          bodyRegex: '(CH|sc)(-?)(?<ticketNumber>\d+)'
          bodyURLRegex: 'https?:\/\/app\.(clubhouse.io|shortcut.com)(\/:org)\/story\/(?<ticketNumber>\d+)'

Inputs

Name Required Description default
token The GitHub access token
ticketLink The URL format for a link to a ticket with a %ticketNumber% placeholder
ticketPrefix The unique identifier for the ticket/issue
titleFormat The intended format the title should be set to if it doesn't match the regular expression. Available variables are %prefix%, %id%, and %title% %prefix%%id%: %title%
titleRegex The regular expression used to search the title for the intended format ^(CH)(-?)(?\d{3,})
titleRegexFlags The regular expression flags applied to the title regular expression gi
branchRegex The regular expression used to search the branch for the intended format ^(CH)(-?)(?\d{3,})
branchRegexFlags The regular expression flags applied to the branch regular expression gi
bodyRegex The regular expression used to search the body for a shorthand reference (example #123) (CH)(-?)(?\d{3,})
bodyRegexFlags The flags applied to the body regular expression when searching for a shorthand reference gim
bodyURLRegex The regular expression used to search the body for a URL reference (example https://github.com/octocat/hello-world/issues/1)
bodyURLRegexFlags The flags applied to the body regular expression when searching for a URL reference gim
exemptUsers Comma separated string of usernames that will be exempt from all checks. Most useful for bot/automated PRs (example "octocat,dependabot")
quiet If true, don't comment when a PR title is updated true
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].