All Projects → hattan → verify-linked-issue-action

hattan / verify-linked-issue-action

Licence: MIT license
A GitHub action that verifies your pull request contains a reference to an issue.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to verify-linked-issue-action

action-autotag
Automatically generate a new tag when the manifest file (package.json, Dockerfile, custom file, etc) version changes.
Stars: ✭ 45 (+150%)
Mutual labels:  action, github-actions
upx-action
Strips and runs upx on binaries
Stars: ✭ 17 (-5.56%)
Mutual labels:  action, github-actions
cuda-toolkit
GitHub Action to install CUDA
Stars: ✭ 34 (+88.89%)
Mutual labels:  action, github-actions
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (+77.78%)
Mutual labels:  action, github-actions
setup-bats
GitHub Action to setup BATS testing framework
Stars: ✭ 25 (+38.89%)
Mutual labels:  action, github-actions
lychee-action
Github action to check for broken links in Markdown, HTML, and text files using lychee, a fast link checker written in Rust.
Stars: ✭ 89 (+394.44%)
Mutual labels:  action, github-actions
github-run-tests-action
mabl Github Actions implementation
Stars: ✭ 39 (+116.67%)
Mutual labels:  action, github-actions
ssh2actions
Connect to GitHub Actions VM via SSH for interactive debugging
Stars: ✭ 62 (+244.44%)
Mutual labels:  action, github-actions
action-eslint
🐋🐬 TypeScript/JavaScript ESLint action
Stars: ✭ 24 (+33.33%)
Mutual labels:  action, github-actions
GitHub-Pages-deploy
A GitHub Action to deploy a static site on GitHub Pages.
Stars: ✭ 42 (+133.33%)
Mutual labels:  action, github-actions
setup-clang
GitHub action to set up Clang & LLVM
Stars: ✭ 28 (+55.56%)
Mutual labels:  action, github-actions
upload-to-discord
A GitHub Action that uploads a file to Discord channel.
Stars: ✭ 44 (+144.44%)
Mutual labels:  action, github-actions
vs-shell
GitHub action to set up the Visual Studio shell environment
Stars: ✭ 36 (+100%)
Mutual labels:  action, github-actions
git-actions
A GitHub Action to run arbitrary git commands
Stars: ✭ 72 (+300%)
Mutual labels:  action, github-actions
colab-badge-action
GitHub Action that generates "Open In Colab" Badges for you
Stars: ✭ 15 (-16.67%)
Mutual labels:  action, github-actions
action-sync-node-meta
GitHub Action that syncs package.json with the repository metadata.
Stars: ✭ 25 (+38.89%)
Mutual labels:  action, github-actions
hugo-action
Commands to help with building Hugo based static sites
Stars: ✭ 65 (+261.11%)
Mutual labels:  action, github-actions
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+677.78%)
Mutual labels:  action, github-actions
action-homebrew-bump-formula
⚙️ A GitHub Action to easily bump Homebrew formula on new release
Stars: ✭ 68 (+277.78%)
Mutual labels:  action, github-actions
actions
Set of actions for implementing CI/CD with werf and GitHub Actions
Stars: ✭ 67 (+272.22%)
Mutual labels:  action, github-actions

Verify Linked Issue Action

A GitHub action that verifies your pull request contains a reference to an issue.

On a PR that does not include a linked issue or reference to an issue in the body, the check should fail and a comment will be added to the PR.

Failing checks

Installation

As a part of an existing workflow

- name: Verify Linked Issue
  uses: hattan/[email protected]
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Pleasure ensure the following types on the pull_request triggers:

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

As a separate workflow

Inputs

(Optional) The action will add the following text to a PR when verification fails. 'Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>'

You can customize this message by providing an optional 'message' input with the string you would like to include as the comment.

- name: Verify Linked Issue
  uses: hattan/[email protected]
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    message: 'Error! This is a custom error'

File Templates

If you want a more complex message, consider using a static template file. (Support for dynamic templates will be coming soon!)

There are two options when using template files:

  • Option 1) Default File Path: Add a file to .github called VERIFY_PR_COMMENT_TEMPLATE.md. The content of this file will be used as the fail comment in the PR.
  • Option 2) Speciy a filename input with the path to a template file.
- name: Verify Linked Issue
  uses: hattan/[email protected]
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  with:
    filename: 'example/templates/fail_comment.txt'

Trying it out

  • Create a new pull request and take care to not include a linked item or mention an issue.
  • The build should fail.
  • Edit the PR body and add a reference to a valid issue (e.g. #123 )

Failed Build log

Known Issues

  • There must be a space after the issue number (ie "#12 " not "#12".) This is due to the way the RegEx is structured and will be resolved in a future release.

  • The Issue reference by # needs to be in the body, we don't currently look in the title. That is a future enhancement.

v1

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].