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

feat: enable conventional commits & Gitmoji 🚀 as configuration options #160

Closed
wants to merge 10 commits into from

Conversation

ThijSlim
Copy link
Contributor

Add configuration to enable conventional commits. By default it is "false" to not break existing behavior. In the future this could be defaulted to "true", if that is a global standard.

@ThijSlim ThijSlim changed the title feat: Enable conventional commits standard as configuration option feat: enable conventional commits standard as configuration option Mar 17, 2023
@ThijSlim
Copy link
Contributor Author

ThijSlim commented Mar 17, 2023

Closes #32

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

How does one test this GitHub PR with the set conventional commits since there are not flags set?

@ThijSlim
Copy link
Contributor Author

ThijSlim commented Mar 18, 2023

I don’t know what you mean, could you explain this in bit more detail? I tested this through the specs and it seems to add almost always the right conventional commit type.

I do think that there needs to be an option to override the type whenever a user simply wants a specific one, but lets add that in a different PR?

…ource code, paving the way for adding Gitmoji in a similar way.
@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

Will do.

After switching to this GitHub PR, I ran some tests locally using the following commands. However, I did not obtain the expected conventional commit output. This prompted me to consider the possibility of requiring some configuration.

pnpm i
pnpm build
node ./dist/cli.mjs

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

I am planning to submit a GitHub PR. In the near future, I would like to see the aicommits command output to include a GitEmoji, conventional commit message, and two lines under, a body explaining the purpose of the commit, which will require modifying the prompt.

An example is shown below in the following issue comment.

#76 (comment)

@ThijSlim
Copy link
Contributor Author

I will check if I can include it in this PR, also adding more testing and refining the prompt.

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

Understood, thank you.

Currently I am running tests myself.

@ThijSlim
Copy link
Contributor Author

@NorkzYT I greatly improved the tests, I also made the conventional commits more context aware and added Gitmoji to the mix.

@ThijSlim
Copy link
Contributor Author

I can't set config using this approach. would you recommend adding gitmoji and conventional as cli flags?

pnpm i
pnpm build
node ./dist/cli.mjs

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

Nice mate, great work!

Now I need to make an issue since the @dqbd/tiktoken needs to be updated to 1.0.2 and change the const encoder = encodingForModel('text-davinci-003'); code to use gpt-3.5-turbo since the current code only uses GPT3.

Related issue:
dqbd/tiktoken#17

Related GitHub PR:
#123

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

I can't set config using this approach. would you recommend adding gitmoji and conventional as cli flags?

pnpm i
pnpm build
node ./dist/cli.mjs

I will see what I can do.

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

@thijslimmen

Earlier I read your question incorrectly. Yes, it would be beneficial for future use cases to have both conventional commits and gitmojis to have cli flags.

@ThijSlim
Copy link
Contributor Author

ThijSlim commented Mar 18, 2023

Also, with the increasing amount of features, usability becomes a thing, because sometimes someone finds the text correct, but then the conventional commit type or gitmoji may not be right, so it would be nice to mix and match all the generated features.

@NorkzYT
Copy link

NorkzYT commented Mar 18, 2023

Agreed.

@ThijSlim ThijSlim changed the title feat: enable conventional commits standard as configuration option feat: enable conventional commits & Gitmoji 🚀 as configuration options Mar 18, 2023
@NorkzYT
Copy link

NorkzYT commented Mar 20, 2023

Opened a PR with new changes.
#163

@ThijSlim ThijSlim closed this Mar 22, 2023
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

Successfully merging this pull request may close these issues.

2 participants