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

Feature Request: Option to print the Commit message it self in enforce output #233

Open
janderssonse opened this issue Feb 22, 2023 · 0 comments

Comments

@janderssonse
Copy link
Contributor

janderssonse commented Feb 22, 2023

Currently, a run with enforce gives the PASS or FAIL output. However, to see the commit header itself that was tested one has to run git log or alike. It would simplify usage if the git commit message header that was tested against was show in the enforce out put.

This would make even more sense when running a multiple commits check, 9023e3a as it is now, the output can be a bit confusing without a header of the message tested against seperating them.

Example of current output: with enforce --base-branch=main, from a feature branch with multiple commits:

A commit message between every section would be really helpful here, to see the difference between the 3 commits validated:



commit        Header Length                PASS          Header is 17 characters

commit        Imperative Mood              PASS          Commit begins with imperative verb

commit        Header Case                  PASS          Header case is valid

commit        Header Last Character        PASS          Header last character is valid

commit        DCO                          PASS          Developer Certificate of Origin was found

commit        GPG                          PASS          GPG signature found

commit        Conventional Commit          PASS          Commit message is a valid conventional commit

commit        Header Length                PASS          Header is 27 characters

commit        Imperative Mood              FAILED        First word of commit must be an imperative verb: "added" is invalid

commit        Header Case                  PASS          Header case is valid

commit        Header Last Character        PASS          Header last character is valid

commit        DCO                          FAILED        Commit does not have a DCO

commit        GPG                          PASS          GPG signature found

commit        Conventional Commit          FAILED        Invalid type "dore": allowed types are [chore docs perf refactor style test release feat fix feat fix feat fix]
commit        Header Length                PASS          Header is 26 characters

commit        Imperative Mood              PASS          Commit begins with imperative verb

commit        Header Case                  PASS          Header case is valid

commit        Header Last Character        PASS          Header last character is valid

commit        DCO                          PASS          Developer Certificate of Origin was found

commit        GPG                          PASS          GPG signature found

commit        Conventional Commit          PASS          Commit message is a valid conventional commit

Suggest example of current output: with enforce --base-branch=main, from a feature branch with multiple commits:


COMMIT HEADER: feat: add a commit

commit        Header Length                PASS          Header is 17 characters

commit        Imperative Mood              PASS          Commit begins with imperative verb

commit        Header Case                  PASS          Header case is valid

commit        Header Last Character        PASS          Header last character is valid

commit        DCO                          PASS          Developer Certificate of Origin was found

commit        GPG                          PASS          GPG signature found

commit        Conventional Commit          PASS          Commit message is a valid conventional commit

COMMIT HEADER: feat: added a commit

commit        Header Length                PASS          Header is 27 characters

commit        Imperative Mood              FAILED        First word of commit must be an imperative verb: "added" is invalid

and so on

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