GithubHelp home page GithubHelp logo

crassula / conventional-pr-title-action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aslafy-z/conventional-pr-title-action

0.0 1.0 0.0 16.14 MB

Ensure your PR title matches the Conventional Commits spec.

Home Page: https://github.com/marketplace/actions/conventional-pr-title

JavaScript 96.96% Dockerfile 3.04%

conventional-pr-title-action's Introduction

conventional-pr-title-action

This is a Github Action that ensures that your PR title matches the Conventional Commits spec.

This is helpful when you're using semantic-release with the Conventional Commits preset. When using the Squash and merge strategy, Github will suggest to use the PR title as the commit message. With this action you can validate that the PR title will lead to a correct commit message.

See Conventional Commits for sample titles.

Inputs

success-state

Required Description of the status check if validation succeeds. Default "Title follows the specification.".

failure-state

Required Description of the status check if validation fails. Default "Title does not follow the specification.".

context-name

Required Persistent status check context key. Default "conventional-pr-title".

preset

Required Conventional changelog preset. Default "conventional-changelog-angular".

Outputs

success

true if the validation succeed. false otherwise.

Example usage

name: Check PR title
on:
  pull_request:
    types:
      - opened
      - reopened
      - edited
      - synchronize

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: aslafy-z/conventional-pr-title-action@master
        with:
          success-state: Title follows the specification.
          failure-state: Title does not follow the specification.
          context-name: conventional-pr-title
          preset: conventional-changelog-angular@latest
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Note: Avoid using master ref, prefer to pin the last release's SHA ref.

Credits

All thanks goes to amannn's semantic-pull-request action.

conventional-pr-title-action's People

Contributors

renovate[bot] avatar aslafy-z avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.