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]: More customizable commit message template and support for Perforce VCS #356

Open
philou opened this issue Jun 24, 2024 · 6 comments

Comments

@philou
Copy link

philou commented Jun 24, 2024

Description

💬 Discuss and agree about design before contribution

I am part of the Murex organization, we have a bit of time this summer, and we would like to contribute to your project. We want to extend it with the following features:

  • More possibilities to customize the commit message itself: to include footers, a "Why" body header, and more details in the body (ex: we want to use it for code katas with TCR, we'd like to ask the AI to give us the list of named baby steps that the trainees used)
  • Support for Perforce because most Murex developers rely on this VCS

To avoid rework, I would like to start a conversation to get your feedback about the proposed features and design before we send pull request.

Suggested Solution

  • Commit customization: We have been thinking of a more advanced template with named sections that could be provided by custom prompts or by command line options
  • Perforce VCS: obviously not all features will be supported. We could create an abstraction for the different VCS and let the tool switch to Perforce with an option, or a configuration. Another way would be to make the tool VCS agnostic, move all git commands out of the tool, and create shell wrappers to give it the diff through stdin, receive the message from stdout, and commit. I'm not sure how this would work with githook or github actions though.

Alternatives

We could start from another tool (ex aicommits)
We could build something from scratch ourselves

Additional Context

We also plan to use the tool on our own internal RAG. I'm not sure what impact will this have yet.

@di-sukharev
Copy link
Owner

hi @philou, nice to meet you

will get back to you this week :)

@di-sukharev
Copy link
Owner

@philou hi

could you provide an example of what response you expect to get with commit customization? and any draft of a command or config to achieve this would be great

as for the perforce, i think the best solution here is to support it as a dependency injection, doing it this way you would need to extract git commands (as they are hardcoded now) and pass them (or Perforce) into the (let's call it) module which requests an LLM to generate a commit message as per the config and CLI options

if Perforce is used instead of git then the github action or githook should be disabled, i imagine a one liner if (engine === perforce) log('no no no, you cant set the hook with perforce'); return;`

@philou
Copy link
Author

philou commented Jul 11, 2024

Thanks for your answer.

We were thinking of the same thing for Perforce.

Regarding the commit customization, we can already go a long way with the template that oco currently provides. We might come back to you later when we need more.

We might also submit PRs to allow configuring the Ollama server address and adding a flowiseAI engine.

@di-sukharev
Copy link
Owner

@philou sounds great, lmk if you need help ;)

@philou
Copy link
Author

philou commented Jul 29, 2024

My colleagues have prepared a branches for FlowiseAI backend: master...murex:opencommit:llmserviceFrontend. They will submit a PR pretty soon

@di-sukharev
Copy link
Owner

@philou the PR was merged and available in the latest version

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

2 participants