GithubHelp home page GithubHelp logo

00mjk / semantic-pull-requests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zeke/semantic-pull-requests

0.0 0.0 0.0 1.93 MB

:robot: Let the robots take care of the semantic versioning

Home Page: https://github.com/apps/semantic-pull-requests

License: Apache License 2.0

JavaScript 99.25% Shell 0.75%

semantic-pull-requests's Introduction

Semantic Pull Requests

GitHub status check that ensures your pull requests follow the Conventional Commits spec

Using semantic-release and conventional commit messages? Install this Probot app on your repos to ensure your pull requests are semantic before you merge them.

โœ‹ Wanna check your pull requests using a GitHub Actions workflow instead? See alternatives below.

How it works

๐Ÿ‘ฎ Note! The default behavior of this bot is not to police all commit messages, but rather to ensure that every PR has just enough semantic information to be able to trigger a release when appropriate. The goal is to gather this semantic information in a way that doesn't make life harder for project contributors, especially newcomers who may not know how to amend their git commit history.

By default, only the PR title OR at least one commit message needs to have semantic prefix. If you wish to change this behavior, see configuration section below.

Scenario Status Status Check Message
PR title is semantic ๐Ÿ’š ready to be squashed
any commit is semantic ๐Ÿ’š ready to be merged or rebased
nothing is semantic ๐Ÿ’› add a semantic commit or PR title

Example Scenario

Take this PR for example. None of the commit messages are semantic, nor is the PR title, so the status remains yellow:

screen shot 2018-07-14 at 6 22 58 pm

screen shot 2018-07-14 at 6 22 10 pm


Edit the PR title by adding a semantic prefix like fix: or feat: or any other conventional commit type. Now use Squash and Merge to squash the branch onto master and write a standardized commit message while doing so:


screen shot 2018-07-14 at 6 23 11 pm

screen shot 2018-07-14 at 6 23 23 pm

Installation

๐Ÿ‘‰ github.com/apps/semantic-pull-requests

Configuration

By default, no configuration is necessary.

If you wish to override some behaviors, you can add a semantic.yml file to your .github directory with the following optional settings:

# Always validate the PR title, and ignore the commits
titleOnly: true
# Always validate all commits, and ignore the PR title
commitsOnly: true
# Always validate the PR title AND all the commits
titleAndCommits: true
# Require at least one commit to be valid
# this is only relevant when using commitsOnly: true or titleAndCommits: true,
# which validate all commits by default
anyCommit: true
# You can define a list of valid scopes
scopes:
  - scope1
  - scope2
  ...
# By default types specified in commitizen/conventional-commit-types is used.
# See: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json
# You can override the valid types
types:
  - feat
  - fix
  - docs
  - style
  - refactor
  - perf
  - test
  - build
  - ci
  - chore
  - revert
# Allow use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowMergeCommits: true
# Allow use of Revert commits (eg on github: "Revert "feat: ride unicorns"")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowRevertCommits: true

Alternatives

This project is a GitHub App that you can install on one or many repositories, making it a convenient choice if you want to use it on lots of different repos, or even an entire GitHub organization full of repos.

If, however, you want more control over exactly how and when your pull requests are semantically checked, consider writing your own custom Actions workflow using a GitHub Action like amannn/action-semantic-pull-request.

License

Apache 2.0

semantic-pull-requests's People

Contributors

gr2m avatar zeke avatar dependabot[bot] avatar greenkeeper[bot] avatar greenkeeperio-bot avatar clakech avatar anshumanv avatar heel avatar binarymuse avatar felipecrs avatar bkeepers avatar macklinu avatar wojtekmach avatar raul6469 avatar stefanbuck avatar rarneson avatar fofr avatar pablosichert avatar locona avatar limaneto avatar levithomason avatar bleggbeard avatar guyfedwards avatar davidcelis avatar clacan avatar aniketroy avatar angaziz avatar churkin avatar amoshydra 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.