Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Ignore "pull request tasks check" for specified checkboxes #591

Open
JuroOravec opened this issue Apr 13, 2020 · 0 comments
Open

Ignore "pull request tasks check" for specified checkboxes #591

JuroOravec opened this issue Apr 13, 2020 · 0 comments

Comments

@JuroOravec
Copy link

Background

Hi, I've started using Zappr recently. I use it for commit check, spec check and approval check. I really like the idea of having the approval policy explicitly defined as a code. It reduces ambiguity, plus compared to having the policy in docs this doesn't run the risk of containing outdated info, so thanks for developing it!

I also wanted to use the "Pull request tasks check" feature. However, in the PR template I use, there are both checkboxes that should all be checked (checklist), but also checkboxes where the contributor should check only one of the boxes (e.g. "Does the PR contain breaking changes? Yes [] / No []").

Question

I wonder whether there have been any thoughts about providing a way to exclude certain checkboxes?

Suggestions

My first thought was similar to how TS (// @ts-ignore) or ESLint (// eslint-disable-line) ignore rules.

Then I checked the code where the tasks check is defined and saw that the regex for detecting unchecked boxes is hardcoded there. So a simpler and more powerful option would be to let user change that regex.

That way, I could modify the regex to look only for checkboxes which are/aren't in particular sections.

However, this would require creating a section in the zappr.yml so it could be configured.

It could look for example like this:

# .zappr.yml
... # other options
tasks:
  pattern: *your regex as string here* # default: '(-|\\*) \\[(\\s|x)\\]', same as it is now
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant