Giter VIP home page Giter VIP logo

contextual-qa-checklist-action's Introduction

Github action for Contextual QA Checklists

Tests are nice, but sometimes you want an additional checklist of items to check before merging a PR (for example, grammar check for documentation changes or last-minute check of visual look). This action allows you to build filename-based checklists to remind the PR author about.

The action reads a checklist specification file (by default CHECKLIST.yml) from the repository root and submits a checklist comment to new/modified PRs based on what files were modified.

Example

Checklist specification

CHECKLIST.yml

paths:
  "README.md":
    - Did you remember to add code examples for newly added methods?
    - Did you make sure that all the example code still functions as expected?
    - Did you remember to update screenshots to match new updates?
  "src/components/**/*.js":
    - Did you check that the component visual look still matches design documents?
  "docs/**":
    - Did you run changes past the copywrite team?

Only one property, paths, is supported at the moment. It takes path specifications as key and a list of items as value.

Action

.github/workflows/checklist.yml

on: [pull_request_target]

jobs:
  checklist_job:
    runs-on: ubuntu-latest
    name: Checklist job
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Checklist
        uses: wyozi/contextual-qa-checklist-action@master
        with:
          gh-token: ${{ secrets.GITHUB_TOKEN }}
          # See options documentation below

Options

comment-header

Overrides the default header text in the PR comment.

comment-footer

Overrides the default footer text in the PR comment.

merge-comment

Merges any new checklist items with the existing checklist comment.

include-hidden-files

Includes files and folders starting with . when matching. Defaults to false.

input-file

The path to the checklist definition file. Default to CHECKLIST.yml in the project root.

gh-token

The Github token for you project.

show-paths

Shows the matched file path in the PR comment. Defaults to true.

Result

When matching files are updated in a PR, the action will automatically post a checklist containing items under that path's key.

See #10 (comment) for an example PR checklist

contextual-qa-checklist-action's People

Contributors

cryogenicbot avatar dependabot[bot] avatar kierankaelin avatar markdorison avatar usernameseb avatar wyozi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

contextual-qa-checklist-action's Issues

Issue with regular expression in the path

In a CHECKLIST.yml, I found something strange, that looks like a regex issue.
This setting wasn't working:

paths:
  "folder1/folder2/**.py":
    - Does anything need to be updated?

Whereas the following works great for me:

paths:
  "folder1/folder2/**/*.py":
    - Does anything need to be updated?

But in your documentation you recommend something like this ("src/components/**.js":).

What is wrong with my code?

New path to CHECKLIST (via input-file) not working

Setting the path to the CHECKLIST file does not work or I do not use input-file in the right way.
I'm getting this outcome:

> Run wyozi/contextual-qa-checklist-action@master
  with:
    gh-token: ***
    input-file: .github/CHECKLIST.yml
    comment-header: Great PR! Please pay attention to the following items before merging:
    comment-footer: This is an automatically generated QA checklist based on modified files
    include-hidden-files: false
    show-paths: true
Error: ENOENT: no such file or directory, open '.github/CHECKLIST.yml'

And yes, I created the file at the right place: sandbox/.github/CHECKLIST.yml (sandbox being the repo name)

Support for using OR (|) in paths

I am trying to use a regular expression to include multiple paths at the same time, hoping to apply the same Checklist. However it's not working, what I tried so far:

This is not triggering a checklist:
https://github.com/ivansabik/contextual-qa-checklist-action-regex/pull/2

Run wyozi/contextual-qa-checklist-action@master
No paths were modified that match checklist paths

Are OR expressions supported via pipe character in the regular expression?

I am getting error "Not Found"

I have tested the referenced file is accessible from action.
Here input-file: ./.github/CHECKLIST.yml is in develop branch and i have checked it is getting checked out correctly.

Screenshot 2023-11-24 at 10 33 46 AM

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.