GitHub Action to validate that PR titles in n8n-io/n8n match n8n's version of the Conventional Commits spec

Overview

validate-n8n-pull-request-title

GitHub Action to validate that PR titles in n8n-io/n8n match n8n's version of the Conventional Commits spec.

Setup

Create .github/workflows/validate-pr-title.yml containing:

name: Validate PR title

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize

jobs:
  validate_pr_title:
    name: Validate PR title
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - name: Validate PR title
        uses: ivov/validate-n8n-pull-request-title@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Output

On validation failure, this action will populate the validation_issues output. You can use this output in subsequent steps, e.g. to send the validation issue as a comment on the pull request.

Output usage example
name: Validate PR title

on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize

jobs:
  main:
    name: Validate PR title and notify
    runs-on: ubuntu-latest
    steps:
      - name: Validate PR title
        uses: ivov/validate-n8n-pull-request-title@v1
        id: validate_pr_title
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - name: Post validation issue as comment
        uses: marocchino/sticky-pull-request-comment@v2
        if: always() # ensure workflow continues executing despite validation errors
        with:
          header: pr_title_failed_validation # for later deletion
          message: |
            Thank you for your contribution!

            PR titles in this repo follow our version of the Conventional Commits spec.
            This allows us to automatically generate the changelog for the next release.
            Therefore, we ask you to adjust your PR title to solve the issue(s) below:

            ```
            ${{ steps.validate_pr_title.outputs.validation_issues }}
            ```

      - name: Remove validation issue comment once resolved
        if: ${{ steps.validate_pr_title.outputs.validation_issues == null }}
        uses: marocchino/sticky-pull-request-comment@v2
        with:
          header: pr_title_failed_validation
          delete: true

Release

git tag -m "Release v1.x.x" v1.x.x
git push --follow-tags

Author

© 2022 Iván Ovejero

License

Distributed under the MIT License.

You might also like...

The Remix version of the fakebooks app demonstrated on https://remix.run. Check out the CRA version: https://github.com/kentcdodds/fakebooks-cra

Remix Fakebooks App This is a (very) simple implementation of the fakebooks mock app demonstrated on remix.run. There is no database, but there is an

Dec 22, 2022

[WIP] n8n nodes that cover the Zoho "Books" API

[WIP] n8n nodes that cover the Zoho

n8n-nodes-starter This repo contains example nodes to help you get started building your own custom integrations for n8n. It includes the node linter

Nov 26, 2022

N8n node for using the Pi-hole API

N8n node for using the Pi-hole API

n8n Pi-hole API client This is an N8n community node. It allows you to use the Pi-hole API [1],[2], in your workflow. Most of the resources provided b

Oct 8, 2022

Lecture by lecture commits of the https://www.udemy.com/build-blockchain-full-stack/ course

Commit-by-commit breakdown of "Build a Blockchain & Cryptocurrency | Full-Stack Edition" This is a commit-by-commit breakdown of "Build a Blockchain &

Dec 12, 2022

GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (istanbul)

GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (istanbul)

GitHub Action: Report NYC coverage GitHub Action that posts the report in a comment on a GitHub Pull Request from coverage data generated by nyc (ista

Nov 23, 2022

A GitHub action to submit your dependency graph from your Mill build to GitHub.

Mill Dependency Submission A GitHub action to submit your dependency graph from your Mill build to GitHub via their Dependency Submission API. The mai

Dec 15, 2022

A GitHub Action that allows to debug GitHub workflows using VS Code.

A GitHub Action that allows to debug GitHub workflows using VS Code.

VS Code Server Action A GitHub Action that allows to debug GitHub workflows using VS Code. Failing CI builds can be annoying especially since we don't

Dec 23, 2022

Generate random ethereum wallets & private keys and then check if they match a wallet that contains some kind of balance, so that you can take it. In Node.js

Ethereum-Stealer Generate random ethereum wallets & private keys and then check if they match a wallet that contains some kind of balance, so that you

Dec 24, 2022

pre-calculated list of similar Persian words ordered by rating and best match

similar-persian-words pre-calculated list of similar Persian words ordered by rating and best match. Install npm: npm install similar-persian-words Us

May 29, 2022
Releases(v1.1.1)
  • v1.1.1(Nov 4, 2022)

  • v1.1.0(Nov 4, 2022)

    What's Changed

    • feat: Enforce initial uppercase for subject instead of lowercase by @csuermann and @ivov in https://github.com/ivov/validate-n8n-pull-request-title/pull/2

    New Contributors

    • @csuermann made their first contribution in https://github.com/ivov/validate-n8n-pull-request-title/pull/2

    Full Changelog: https://github.com/ivov/validate-n8n-pull-request-title/compare/v1...v1.1

    Source code(tar.gz)
    Source code(zip)
Owner
Iván Ovejero
Full-Stack Developer @n8n.io | formerly @Affluent.io | Major League Hacking Fellow 2020
Iván Ovejero
A serverless function that auto commits your daily total time tracked on Wakatime to Github.

A serverless function that auto commits your daily total time tracked on Wakatime to Github. Using Netlify Scheduled Functions, Github GraphQL API, and Wakatime API.

Yinka Adedire 19 Oct 8, 2022
Converts your GitHub commits to LinkedIn posts, to maximize exposure.

linkedpush (site) Converts your GitHub pushes to LinkedIn posts, to maximize exposure. linkedpush-dep-tictok.mp4 How it works Sequence diagram Setup 0

Sebastian Sosa 8 Dec 3, 2022
Master Collection NFT. Mints NFTs on Ethereum containing unique combination of titles for fun.

Master NFT Collection Master NFT Collection is an NFT minting platform that mints NFTs that contain a unique combination of snazzy titles just for fun

MJ LEE 2 Mar 22, 2022
OnePiece /r/place repo to store the template and script for outlining the place to put titles

onepiece-place OnePiece /r/place repo to store the template and script for outlining the place to put titles This script & repo are cloned from Antice

Lopeh 11 Apr 9, 2022
we try to make a tiny p2p client spec, maybe for sigchain gossip thing, maybe for simple blockchain thing

mininode Mininode is a tiny p2p client for prototyping p2p protocols. It is a specification for a set of interfaces that I made to make it easier to t

Nikolai Mushegian 8 Nov 23, 2022
An implementation of the ECMA-419 spec on the Raspberry Pi

raspi-419 An implementation of the ECMA-419 spec on the Raspberry Pi Licsense MIT License Copyright (c) Bryan Hughes Permission is hereby granted, fre

Bryan Hughes 4 Jun 9, 2022
pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles, and a working back button.

pjax = pushState + ajax pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles,

Chris Wanstrath 16.8k Jan 5, 2023
History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState

History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype.

Browser State 10.8k Dec 26, 2022
Zemi is data-driven and reverse-routing library for Express. It provides out-of-the-box OpenAPI support, allowing you to specify and autogenerate an OpenAPI spec.

zemi zemi is a data-driven routing library for Express, built with Typescript. Features: optional, out-of-the-box support for OpenAPI reverse-routing

Yoaquim Cintrón 5 Jul 23, 2022
Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)

openapi-zod-client Generates a zodios (typescript http client with zod validation) from a (json/yaml) OpenAPI spec (or just use the generated schemas/

Alexandre Stahmer 104 Jan 4, 2023