di-sukharev / di-sukharev/opencommit

[Bug]: wrong commit : the message is not about the diff

Open
#252 23 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
7.5k
Forks
445
Avg merge
18m
Merged PRs (30d)
2

Description

Opencommit Version

v2.4.2

Node Version

v20.1.0

NPM Version

v9.8.0

What OS are you seeing the problem on?

Other Linux Distro

What happened?

The commit seems bugged.
.... (about 20 other files but not server.ts at all)
roa/views/formation/liste_formation_programme.php
roa/views/formation/voir_formation_programme.php
autocron.php

◇ 📝 Commit message generated

└ Commit message:
——————————————————
fix(server.ts): change the case of the port variable from lowercase to uppercase (PORT)
feature(server.ts): add support for the process.env.PORT environment variable

Expected Behavior

Right commit message, at least about the filed changed

Current Behavior

Broken commit message

Possible Solution

No response

Steps to Reproduce

No response

Relevant log output

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how Opencommit collects the diff and generates the commit message, using the reported server.ts message and the listed PHP files as the mismatch to reproduce. Compare the files included in the diff with the prompt or input sent for generation. Done means the generated message describes the actual changed files rather than unrelated server.ts changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.