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

Execute Custom Script Before Applying Conventional Commits #517

Open
theovier opened this issue Jan 20, 2024 · 3 comments
Open

Execute Custom Script Before Applying Conventional Commits #517

theovier opened this issue Jan 20, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@theovier
Copy link

theovier commented Jan 20, 2024

What would you like to be able to do?

Hi,

I want to modify my commit message by a custom script (basically extracting a Jira ticket number from the branch name and prefixing the commit with it) and then still use your check for conventional commits afterwards.

I couldn't find a way to chain instructions for the commitMsg. I could only do either or. I could write all the logic for the convential commits inside my custom script too but this would defeat the purpose.

I tried

    commitMsg {
        conventionalCommits()
        appendScript { """            
            ./scripts/prepare-commit-msg.sh
            """ }
    }

but to no avail.

Kind regards,
Theo

Is this a feature you are interested in implementing yourself?

No, I do not have the skills yet to do it

@theovier theovier added the enhancement New feature or request label Jan 20, 2024
@DanySK
Copy link
Owner

DanySK commented Jan 20, 2024

Should be supported already. Can you produce a minimal reproduction kit?

@theovier
Copy link
Author

Yes, however, it will probably take some time. Chances are good that you really do support it already and I just couldn't wrap my head around it.

Just to check: the idea of executing another script in the appendScript is the way you thought it could be done too, right?

@DanySK
Copy link
Owner

DanySK commented Jan 21, 2024

Yes

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