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

Opt-out from the Terminal markdown rendered in dry-run mode #2191

Open
n0th1ng-else opened this issue Oct 14, 2021 · 1 comment
Open

Opt-out from the Terminal markdown rendered in dry-run mode #2191

n0th1ng-else opened this issue Oct 14, 2021 · 1 comment

Comments

@n0th1ng-else
Copy link

New feature motivation

Hello. I wonder if we can opt-out from the Terminal markdown rendered when we run the semantic-release in --dry-run mode?

We use dry-run mode to render the upcoming release notes once developer opens a pull request. It actually does two things - first, it shows the expected version once the PR is merged into the main branch and secondly, it breaks the pipeline if the commit message was in the wrong format and semantic-release could not fetch the proper commit data. So it is kind of secures us from making mistakes while we specify the commit message.

The --dry-run mode transforms the release notes from the markdown into terminal-like text which is nice, looks a bit off in our case. When I put the result of the dry-run into the GitHub comment it looks not that nice.

So I wonder if we can introduce the flag that allows to output of the markdown release notes instead of getting it formatted with TerminalRendered? I understand using the markdown terminal formatted is for human readability, but I think we can find more examples of when the release notes can be useful in the raw markdown format

Screenshot 2021-10-14 at 14 01 53

Screenshot 2021-10-14 at 14 02 18

New feature description

Basically, I am thinking of an extra CLI flag that can be used in pair with --dry-run flag. Something, like npx semantic-release --dry-run --markdown-output would be enough I guess

New feature implementation

The idea is to introduce an additional flag (which is not a breaking change) and once we are in dry run mode, output the release notes with no changes here

@diogokiss
Copy link

Yes, I agree. The output is not being rendered properly when written in GitHub comments.

diogokiss added a commit to diogokiss/semantic-release that referenced this issue Sep 4, 2023
This commit adds a new configuration option called 'marked'.
When set to true, the output of Semantic Release would print Markdown to the
terminal, whenever supported, using the 'marked-terminal' library as usual.

https://www.npmjs.com/package/marked-terminal

When set to false, the output will be printed in plain text.
This feature is particularly useful when the output or the command will be
consumed by another Markdown renderer, like GitHub.

This addresses the following issue.
semantic-release#2191
diogokiss added a commit to diogokiss/semantic-release that referenced this issue Sep 4, 2023
This commit adds a new configuration option called 'marked'.
When set to true, the output of Semantic Release would print Markdown to the
terminal, whenever supported, using the 'marked-terminal' library as usual.

https://www.npmjs.com/package/marked-terminal

When set to false, the output will be printed in plain text.
This feature is particularly useful when the output or the command will be
consumed by another Markdown renderer, like GitHub.

This addresses the following issue.
semantic-release#2191
diogokiss added a commit to diogokiss/semantic-release that referenced this issue Feb 12, 2024
This commit adds a new configuration option called 'marked'.
When set to true, the output of Semantic Release would print Markdown to the
terminal, whenever supported, using the 'marked-terminal' library as usual.

https://www.npmjs.com/package/marked-terminal

When set to false, the output will be printed in plain text.
This feature is particularly useful when the output or the command will be
consumed by another Markdown renderer, like GitHub.

This addresses the following issue.
semantic-release#2191
diogokiss added a commit to diogokiss/semantic-release that referenced this issue Jun 3, 2024
This commit adds a new configuration option called 'marked'.
When set to true, the output of Semantic Release would print Markdown to the
terminal, whenever supported, using the 'marked-terminal' library as usual.

https://www.npmjs.com/package/marked-terminal

When set to false, the output will be printed in plain text.
This feature is particularly useful when the output or the command will be
consumed by another Markdown renderer, like GitHub.

This addresses the following issue.
semantic-release#2191
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

2 participants