-
Notifications
You must be signed in to change notification settings - Fork 330
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
Fix initial prompt and commit message #14
base: dev
Are you sure you want to change the base?
Conversation
…mmit message The initial prompt is now more specific about not including "This commit" in the description, and adds a newline between the subject and description.
@@ -51,7 +51,7 @@ const INIT_MESSAGES_PROMPT: Array<ChatCompletionRequestMessage> = [ | |||
// prettier-ignore | |||
content: `${config?.emoji ? '🐛 ' : ''}fix(server.ts): change port variable case from lowercase port to uppercase PORT | |||
${config?.emoji ? '✨ ' : ''}feat(server.ts): add support for process.env.PORT environment variable | |||
${config?.description ? 'The port variable is now named PORT, which improves consistency with the naming conventions as PORT is a constant. Support for an environment variable allows the application to be more flexible as it can now run on any available port specified via the process.env.PORT environment variable.' : ''}` | |||
${config?.description ? '\nThe port variable is now named PORT, which improves consistency with the naming conventions as PORT is a constant. Support for an environment variable allows the application to be more flexible as it can now run on any available port specified via the process.env.PORT environment variable.' : ''}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this \n will make 2+ lines look like this:
feat(file): smth
fix(file): smth
<description of the above 'feat' and 'fix' goes here>
chore: smth
<description of the 'chore' goes here>
so it would be hard to tell what describes what :)
i'd remove the \n
, so it looks like that:
feat(file): smth
fix(file): smth
<description of the above 'feat' and 'fix' goes here>
chore: smth
<description of the 'chore' goes here>
but i may be wrong here, could you share a screenshot of your result pls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you mean. The reason I did that was for git log --oneline
to work properly; maybe there's a different solution I'm overlooking.
In the picture above, commit message for a24f994
was created with the base version of the script, the other two were created with my modifications. Still trying to figure out why 5a58b0b
only says test:
without a prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is not always a prefix, it's up to gpt :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can add dots to the commit messages if description is set, lines 52 and 53?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dararish so, how about just adding dots to the end of commit messages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@di-sukharev I'm attempting to get it to add the period. Modified the example & prompt, but it still generates the commit message without a period. Do you have a working example I could play with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, adding the period makes it clearer where the "title" ends, but it still shows the whole description with the --oneline flag, which is not desirable when trying to get a quick overview of changes. I will try to refine the prompt in order to make it clear that only the first line(which should be a succinct summary?) should be followed by 2 newlines, but I suspect we might need to add another example.
I just realized that my git diff output is customized and is quite different than the provided example, so that could explain some subpar results. Unfortunately I won't have much time to play around with this until Sunday, feel free to merge the other change until we can figure out a way to move forward with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello @dararish, any update here? i would love to help you here
Co-authored-by: Sukharev <[email protected]>
@dararish i've changed base branch to |
Stale pull request message |
please pull latest |
The initial prompt is now more specific about not including "This commit" in the description, and adds a newline between the subject and description.