在提交体中使用 `#` 会导致 `closes` 出现误报

作者: myii创建于 2019年2月27日更新于 2022年4月14日
标签support

Notes: * This was first opened as an issue against semantic-release. * This may be a duplicate of #391. --- Current behavior Had this happen a few times now but manually fixed previously. If a hash # appears in the commit body, it is seen as a closes in the release notes and changelog. An existing example follows. Commit https://GitHub.com/saltstack-formulas/template-formula/commit/3a072c7: ci(travis): prevent release stage running for PRs * The release stage will always fail due to security reasons: - E.g. https://travis-ci.com/saltstack-formulas/template-formula/jobs/180068519#L466. - Discussed: #42 (comment). * The release stage is unnecessary for PRs until the merge to master, in any case. Resulted in both: * https://GitHub.com/saltstack-formulas/template-formula/releases/tag/v0.7.2 * https://GitHub.com/saltstack-formulas/template-formula/blob/master/CHANGELOG.md#072-2019-02-24 Specifically: > * travis: prevent release stage running for PRs (3a072c7), closes /travis-ci.com/saltstack-formulas/template-formula/jobs/180068519#L466 /GitHub.com/saltstack-formulas/template-formula/pull/42#issuecomment-466446324 Expected behavior The closes shouldn't have been present: > * travis: prevent release stage running for PRs (3a072c7) Environment - semantic-release version: 15 - CI environment: Travis CI - Plugins used: changelog@3, exec@3 & git@7 - semantic-release configuration: release.config.js - CI logs: Check under the Release stage Further example that was manually fixed * Commit: https://GitHub.com/saltstack-formulas/template-formula/commit/068a94d * Manual fix: https://GitHub.com/saltstack-formulas/template-formula/commit/be4571d

内容来源: conventional-changelog/conventional-changelog