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

Add a flag that allows for compact output #7

Open
tbarusseau opened this issue Jul 17, 2020 · 7 comments
Open

Add a flag that allows for compact output #7

tbarusseau opened this issue Jul 17, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@tbarusseau
Copy link
Contributor

As of now, all commit messages seem to be spaced out:

    ci(CircleCI)!: Renamed main build job
    
    Renamed main build job from `build-base` to `base`
    
    BREAKING CHANGE: The `build-base` is now named `base`
    
    123

Allowing the user to generate a more compact message with -c/--compact would be neat:

    ci(CircleCI)!: Renamed main build job
    Renamed main build job from `build-base` to `base`
    BREAKING CHANGE: The `build-base` is now named `base`
    123
@mainrs mainrs added bug Something isn't working enhancement New feature or request labels Jul 17, 2020
@mainrs
Copy link
Owner

mainrs commented Jul 17, 2020

This could be taken further by introducing some kind of template where a user can define their own template and formatting (commits.template):

{type}{if has_scope: ({scope})}{if is_breaking: !}: {short_msg}
{long_msg}
{if is_breaking: BREAKING CHANGES: {breaking_changes}}
{if are_affected: issues_affected}

Just an idea :)

@tbarusseau
Copy link
Contributor Author

tbarusseau commented Jul 17, 2020

Are you alright with adding structopt for command-line arguments parsing?

@mainrs
Copy link
Owner

mainrs commented Jul 17, 2020

I've worked with both structopt and clap. Since structopt does rely on clap anyway and has been merged into the 3.0-alpha I'd rather use that version of clap.

@mainrs mainrs removed the bug Something isn't working label Jul 18, 2020
@mainrs
Copy link
Owner

mainrs commented Jul 19, 2020

I am working on #12, so this could be solved with it. Not sure if I want to add a flag for it or just provide an alternative template inside the repo that people can use, as my main goal is to follow the conventional commits specification.

@tbarusseau
Copy link
Contributor Author

While it makes sense for the spec to separate the title, body, and footer, on shorter commit messages it's a pity to have 2 newlines for 3 lines of content. I agree that it's important to follow a specification for the commits, but if only the commits were pretty to look at as well!

@mainrs
Copy link
Owner

mainrs commented Jul 20, 2020

So I have thinking about this for a while and I will probably include a compact version of the current template without the new lines. However, the help screen will have a note that it is not compliant with the specification.

@tbarusseau
Copy link
Contributor Author

That sounds great!

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

No branches or pull requests

2 participants