ciena-blueplanet / pr-bumper

Bump the version of an npm package based on a GitHub Pull Request
MIT License
19 stars 17 forks source link

GFM Checklist support does not support the "*" character for lists, only "-" #127

Closed notmessenger closed 6 years ago

notmessenger commented 6 years ago

We can either modify the regex here - https://github.com/ciena-blueplanet/pr-bumper/blob/670a00b380a6419a5b67f607a1821dab912e42f1/lib/utils.js#L299 - to accept either or indicate in this section of the README - https://github.com/ciena-blueplanet/pr-bumper#gfm-checklist-support - that you can only create the lists with the - character.

We should modify the regex to support both to lessen the burden on the user, unless there is a reason we cannot do this that I am unaware of.

job13er commented 6 years ago

I'm not sure how much of a burden on the user it is with PULL_REQUEST_TEMPLATE.md, but I have no problem accepting either one.

notmessenger commented 6 years ago

It would be a burden reading the README.md to have to know cannot use the full syntax of GitHub Markdown. As it is right now we do not offer an example template syntax, only the rendered value. They already have to view the source of the README.md if they want to copy/paste the example. Or, if they do what I did, I saw the visual and thought I had recreated it as needed in a project I'm working on and discovered that I had not satisfied the regex.

But modifying the regex to support both will solve that so that is the improvement we will implement 👍

job13er commented 6 years ago

It would be a burden reading the README.md

?? I'm not sure I agree that reading the README.md counts as a burden.

The link in the README.md points to https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments which explicitly shows using - for setting up a checklist.

So, both the example in the README.md:

### This project uses [semver](semver.org), please check the scope of this pr:
 - [ ] #none# - documentation fixes and/or test additions
 - [ ] #patch# - backwards-compatible bug fix
 - [ ] #minor# - adding functionality in a backwards-compatible manner
 - [x] #major# - incompatible API change

And the example in the link provided in the README.md explaining GFM Checklist syntax:

- [ ] a task list item
- [ ] list syntax required
- [ ] normal **formatting**, @mentions, #1234 refs
- [ ] incomplete
- [x] completed

Provide examples that work properly with pr-bumper.

So far, every example I've found for task lists in GFM use -.

While I'm not exactly against supporting *, I disagree that any burden has been placed on users with the current implementation/documentation.