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

Allow specifying Markdown heading levels #56

Closed
ghost opened this issue Jan 27, 2021 · 3 comments · May be fixed by #59
Closed

Allow specifying Markdown heading levels #56

ghost opened this issue Jan 27, 2021 · 3 comments · May be fixed by #59

Comments

@ghost
Copy link

ghost commented Jan 27, 2021

Is it possible to specify the level of the headings in the Markdown file?

For example, currently my Markdown is being output like so:

## Bug fixes

- ...

But I'd instead like it to be:

### Bug fixes

- ...

Obviously I can make these changes manually after the Markdown file has been generated, but I was hoping to automate it...

@philwebb
Copy link
Collaborator

It's currently hard coded in ChangelogGenerator. It shouldn't be too hard to change that code to accept a configuration option.

@ghost ghost changed the title Specify heading levels Allow specifying Markdown heading levels Jan 27, 2021
MysterAitch added a commit to MysterAitch/github-changelog-generator that referenced this issue Mar 20, 2021
@MysterAitch
Copy link
Contributor

I have just submitted a PR to allow for a configurable prefix that introduces defaultTitlePrefix (defaulting to ## for backwards compatability).

Despite this, I cannot help but wonder if the idea of a prefix / heading level should be removed entirely, and just have it configured via the title itself - for example, to get level three headings:

changelog:
  repository: testorg/testrepo
  sections:
  - title: "### :star: New Features"
    labels: ["enhancement"]
    sort: "created"
  - title: "### Bugs"
    labels: ["bug"]
    group: "test"
  issues:
    sort: title
    exclude:
      labels: ["hide"]
  contributors:
    title: "### Nice one!"
    exclude:
      names: ["philwebb"]
  external_links:
  - name: "### Release Notes 1"
    location: "url1"
  - name: "Release Notes 2"
    location: "url2"

MysterAitch added a commit to MysterAitch/github-changelog-generator that referenced this issue Mar 20, 2021
@philwebb
Copy link
Collaborator

Closing in favor of PR #59. We can continue the discussion on the PR.

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

Successfully merging a pull request may close this issue.

2 participants