di-sukharev / di-sukharev/opencommit
[Feature]: Add ability to inform Opencommit of purpose of changes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 445
- Avg merge
- 18m
- Merged PRs (30d)
- 2
Description
Description
I would like to request a feature that allows users to inform Opencommit of the purpose of a commit. This will enable Opencommit to generate more descriptive and specific commit messages based on the user's input. For example, running oc "fix violation of Markdownlint rule MD034" would result in a suggested commit of:
"🚨 lint(idea-intake.md): fix bare urls violation" "This commit wraps the email address in angle brackets to adhere to the markdownlint rule MD034, which disallows the use of bare URLs. The change resolves the linting error and ensures better compatibility with various markdown parsers."
Suggested Solution
To implement this feature, Opencommit can be extended to accept an optional argument that describes the purpose of the commit. The input can be parsed to extract relevant information (e.g., lint rule violations) and used to generate a commit message that reflects the user's input.
Alternatives
An alternative solution could be to allow users to inform Opencommit of the purpose during interactive usage of oc, without requiring an extra argument. This can be achieved by prompting the user to provide a description of the commit's purpose after they are presented with the generated commit message. Opencommit can then use this input to re-generate a more informative and context-specific commit message. This approach keeps the command-line interface clean while still enabling users to provide additional information for generating better commit messages.
Additional Context
The primary goal of this feature is to make commit messages more informative and relevant by allowing users to provide context-specific information. By generating commit messages that accurately describe the purpose of a commit, it will be easier for project maintainers and contributors to understand the changes made in each commit, ultimately improving the overall quality and maintainability of the project.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the oc command and trace how its arguments and interactive usage reach commit-message generation. Compare the proposed optional purpose argument with the interactive alternative, and define completion as user-provided context producing a more specific commit message like the Markdownlint example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, javascript
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100