hardhat-template icon indicating copy to clipboard operation
hardhat-template copied to clipboard

Template should write the first commit message as "feat: initial commit"

Open scorpion9979 opened this issue 3 years ago • 5 comments

Currently when using the template, it produces the first commit message in the created repo as "Initial commit". My proposal is to change it to "feat: initial commit", so as to remain consistent with the conventional commits specification.

scorpion9979 avatar Apr 03 '22 06:04 scorpion9979

I actually don't know how to do this. I asked for help on StackOverflow and on the GitHub forum. I will follow up here once I find out the solution - if there is one!

PaulRBerg avatar Apr 03 '22 07:04 PaulRBerg

I error to ⧗ input: Hello World! ✖ subject may not be empty [subject-empty] ✖ type may not be empty [type-empty]

✖ found 2 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky > commit-msg hook failed (add --no-verify to bypass)

zinderud avatar May 30 '22 07:05 zinderud

@zinderud this template enforces conventional commits. You can read the full specification here.

You cannot write "Hello World" as a commit message - it will have to be "feat: hello world".

PaulRBerg avatar May 30 '22 11:05 PaulRBerg

I have an idea where by using a GitHub action that runs just once when the template is used for a new repo. We could replace some values like repo links and maybe replace the package.json author and other details like the badges in the readme. And auto commit with --amend and a new commit message feat: initial commit. Any thoughts?

Since this all happens right at the beginning I wouldn't mind rewriting the history at this point since it's unlikely people will git clone right away.

Janther avatar Aug 10 '22 01:08 Janther

Ah, this would very interesting. Great idea @Janther. We could take inspiration from the femplate Foundry template on how to do the initial renaming.

PaulRBerg avatar Aug 10 '22 07:08 PaulRBerg