Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defining the commitPartial voids other wirter and presetConfig options #399

Open
Kaitou786 opened this issue Dec 13, 2022 · 0 comments
Open

Comments

@Kaitou786
Copy link

I have the .releaserc as

- - "@semantic-release/release-notes-generator"
  - presetConfig:
      issuePrefixes: ["xyz-", "abc-"]
      issueUrlFormat: "https://my.atlassian.net/browse/{{id}}"
    preset: conventionalcommits
    writerOpts:
      commitsSort: ["subject", "scope"]   
      commitPartial: |-
        * {{header}}
        {{~!-- commit link --}} {{#if @root.linkReferences~}}
          ([{{hash}}](
          {{~#if @root.repository}}
            {{~#if @root.host}}
              {{[email protected]}}/
            {{~/if}}
            {{~#if @root.owner}}
              {{[email protected]}}/
            {{~/if}}
            {{[email protected]}}
          {{~else}}
            {{[email protected]}}
          {{~/if}}/
          {{[email protected]}}/{{hash}}))
        {{~else}}
          {{~hash}}
        {{~/if}}
        {{~!-- commit references --}}
        {{~#if references~}}
          , closes
          {{~#each references}} {{#if @root.linkReferences~}}
            [
            {{~#if this.owner}}
              {{~this.owner}}/
            {{~/if}}
            {{~this.repository}}#{{this.issue}}](
            {{~#if @root.repository}}
              {{~#if @root.host}}
                {{[email protected]}}/
              {{~/if}}
              {{~#if this.repository}}
                {{~#if this.owner}}
                  {{~this.owner}}/
                {{~/if}}
                {{~this.repository}}
              {{~else}}
                {{~#if @root.owner}}
                  {{[email protected]}}/
                {{~/if}}
                  {{[email protected]}}
                {{~/if}}
            {{~else}}
              {{[email protected]}}
            {{~/if}}/
            {{[email protected]}}/{{this.issue}})
          {{~else}}
            {{~#if this.owner}}
              {{~this.owner}}/
            {{~/if}}
            {{~this.repository}}#{{this.issue}}
          {{~/if}}{{/each}}
        {{~/if}} - {{author.name}}

As soon as I define the commitPartial in the config the other default and defined options are not respected; when it is present the issues are not linked, the commit sha is not transformed to 7 chars.
Removing it make the other things work. Am I missing something here?
The template is the default one picked from the repo... we just added the - {{author.name}} at the end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant