Giter Site home page Giter Site logo

checkmate's Introduction

Checkmate 🕵️

Automated checklist inspector for your pull requests

Features

  • Fails validation until all configured checklists in the pull request description are checked.
  • Automatic checklists triggered on files modified in the pull request.
  • Support for validating select lists i.e. radio button.
  • Job summary workflow report.

Configuration

Pull Request Description Checks

In your PR description or issue template, place <!--Checkmate--> above the checklist block you want validated. A block of checklist items is one without empty lines in-between.

#### :heavy_check_mark: Checklist

<!--Checkmate-->

- [ ] Added or updated documentation
- [x] Tests for new functionality and regression tests for bug fixes

#### This checklist will not be validated

- [ ] This is ignored
- [ ] This is ignored
- [ ] This is ignored


#### Oasis or Blur?
This select list validates that only one item is selected.

<!--Checkmate select=1-->
- [ ] Oasis
- [ ] Blur

Then configure the action in your workflow like

on:
  pull_request:
    types: [edited, opened, reopened]
    
name: Checkmate
jobs:
  validate-checklists:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Validate Checklists
      uses: roryq/checkmate@master

Automatic checklists

Similar to the workflow triggers on file paths, you can configure Checkmate to write a checklist comment on a pull request which will be validated along with the pull request description.

To enable the automated checklists configure the with.paths and the with.github_token inputs, and add the synchronize event for pull_request and listen to all issue_comment events.

If you want to use a Selectlist then the first item should be the <!--Checkmate select=1--> comment.

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

name: Checkmate
jobs:
  validate-checklists:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Validate Checklists
        uses: roryq/checkmate@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          paths: |
            docs/**/*.md:
              - I have got the grammar police to proofread my changes.
            schema/migrations/*.sql:
              - There are no breaking changes in these migrations
              - I have notified X team of the new schema changes
            database/*.go:
              - <!--Checkmate select=2-->
              - Strong Consistency
              - Availability
              - Partition Tolerance

Which will create and update a comment when the changeset files match the configured patterns.

Thanks for your contribution!
Please complete the following tasks related to your changes and tick the checklists when complete.

### Checklist for files matching *docs/\*\*/\*.md*
<!-- Checkmate filepath=docs/**/*.md -->
- [ ] I have got the grammar police to proofread my changes.

### Checklist for files matching *schema/migrations/\*.sql*
<!-- Checkmate filepath=schema/migrations/*.sql -->
- [ ] There are no breaking changes in these migrations
- [ ] I have notified X team of the new schema changes

### Select 2 for files matching *database/\*.go*
<!-- Checkmate select=2 filepath=database/*.go -->
- [ ] Strong Consistency
- [ ] Availability
- [ ] Partition Tolerance

checkmate's People

Contributors

alex3236 avatar roryq 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.