Giter Club home page Giter Club logo

pull-request-checkstyle's Introduction

CI License

Pull Request Checkstyle

Pull Request Checkstyle is a simple Github action that helps to set up some styling rules for the PR commit messages and branch names and identify their violation during CI runtime.

Usage

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      GITHUB_TOKEN: ${{ secrets.SOME_TOKEN }}
    steps:
    - name: "Check branch name and commit messages style"
      uses: maximbircu/[email protected]
      with:
        commit-message-title-regex: ".*"     # Commit message title regex (Note that it validates just the first line of the commit message)
        commit-message-title-min-length: 20  # Commit message title min length (Note that it validates just the first line of the commit message)
        commit-message-title-max-length: 72  # Commit message title max length (Note that it validates just the first line of the commit message)

        branch-name-regex: ".*"        # Branch name regex
        branch-name-min-length: 20     # Branch name min length
        branch-name-max-length: 72     # Branch name max length

Contribution rules:

  1. Make sure there is a GitHub issue describing the changes you want to contribute with. (Add one if needed)
  2. Submit a PR just in case you:
  • Fixed the bug or implement the new feature properly;
  • Covered all code with unit tests;
  • Updated the changelog file;
  • Updated the documentation (If needed);

License

Copyright 2020 Maxim Bîrcu

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

pull-request-checkstyle's People

Contributors

maximbircu avatar dependabot[bot] avatar danielortizlira avatar

Stargazers

 avatar Christine Belzie avatar Bilal Doğan avatar Artem Ustinov avatar Yuichi Goto avatar Isaac Moore avatar K. Siva Prasad Reddy avatar Laurent avatar Dan Ciobanu avatar Eric avatar

Watchers

James Cloos avatar

pull-request-checkstyle's Issues

Adjust the changelog file and CI after repository migration

Abstract

The repository was migrated to a fresh one in order to fix the GitHub market publishing issue. Because during the migration process was migrated just the code, branches, and commits, there might be links tight to the old repository which are not relevant anymore and should be removed.

Requirements

  1. Remove links to issues from the changelog file
  2. Fix the GitHub access token secret env variable name
  3. Fix the CI label from the README file

Consumer flow

  1. Make sure the CI is ✅
  2. Make sure the readme file doesn't contain obsolete issue links.

Add a style check for the Pull Request title

Abstract

It would be nice to have a check for the pull request title since this title is used as a merge commit usually.

Requirements

Add a check style that will check for the pull request title to match the provided regex and also to be of the required length.

Consumer flow

TBA

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.