Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: refs for linked issues in conventional commit parser#1362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JCHacking wants to merge1 commit intopython-semantic-release:master
base:master
Choose a base branch
Loading
fromJCHacking:linked-issues-refs

Conversation

@JCHacking
Copy link
Contributor

@JCHackingJCHacking commentedNov 5, 2025
edited by codejedi365
Loading

Purpose

With conventional commit, you can also reference issues withRefs: #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)

@JCHackingJCHacking changed the titlefeat: Add refs for linked issues in conventional commitfeat: Add refs for linked issues in conventional commit parserNov 5, 2025
@JCHackingJCHackingforce-pushed thelinked-issues-refs branch 2 times, most recently from0cf1466 to46af5f6CompareNovember 5, 2025 21:36
@JCHackingJCHacking changed the titlefeat: Add refs for linked issues in conventional commit parserfeat: refs for linked issues in conventional commit parserNov 5, 2025
@codejedi365
Copy link
Contributor

codejedi365 commentedNov 8, 2025
edited
Loading

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@JCHackingJCHacking

Labels

awaiting-replyWaiting for response

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JCHacking@codejedi365

[8]ページ先頭

©2009-2025 Movatter.jp