With conventional commit, you can also reference issues withRefs: #1234. This does not seem to have been considered.
In theConventional Commit Specification, it only defines the authorized existence of footers, excerpt: One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a : or # separator, followed by a string value (this is inspired by thegit trailer convention). A footer’s token MUST use - in place of whitespace characters, e.g., Acked-by (this helps differentiate the footer section from a multi-paragraph body). An exception is made for BREAKING CHANGE, which MAY also be used as a token. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
The examples used in the specification do use theRefs: git trailer to define issue examples, however, none of the current Team Version Control System (VCS) Servers (Github, GitLab, Gitea, BitBucket) recognizerefs as a defined git trailer or syntax to close an issue automatically upon push or merge of that commit to the default branch. That is where I came up with the authorized git footer list to extract issue references. In PSR's custom template, I use thelinked_issues to add a closure reference into the CHANGELOG and I deliberately left offref: because then I had a way of still adding a reference for why this commit was being made without closing it or marking it as closed in the CHANGELOG. Theref git trailer, I feel is useful for incremental adjustments while the others are helpful for when the issue is complete. The next goal is to use thelinked_issues to write a comment on those issues about the release that has been made (see#975). This would be broken with the use ofref especially if the issue was not auto-closed because the VCS does not interpret that, although you could argue that PSR currently supports a superset of closing git footers beyond what the team VCS's currently support individually. PSR's is also a bit more flexible for multiple issue specification that is not supported by most VCSs. An alternative implementation? Add ref and separate out thelinked_issues fromclosed_issues on the commit object. Then, for#975, only write a release note on theclosed_issues and use the Team VCS API to auto close the issue if it isn't already. The second part of this is to handle the superset problem when the Team VCS in use doesn't support that git trailer type but PSR does.
Separately, you did not update the unit tests or documentation so don't mark off the PR completion checklist until you have. |
Uh oh!
There was an error while loading.Please reload this page.
Purpose
With conventional commit, you can also reference issues with
Refs: #1234. This does not seem to have been considered.Rationale
Add that case to the regex as well.
How to Verify
With a commit containing that reference form, when generating the changelog, it is added to linked_issues.
PR Completion Checklist
Reviewed & followed theContributor Guidelines
Changes Implemented & Validation pipeline succeeds
Commits follow theConventional Commits standard
and are separated into the proper commit type and scope (recommended order: test, build, feat/fix, docs)
Appropriate Unit tests added/updated
Appropriate End-to-End tests added/updated
Appropriate Documentation added/updated and syntax validated for sphinx build (see Contributor Guidelines)