Skip to content

[FEATURE] Skip initial commit message when it's not a real initial commitΒ #219

@guibranco

Description

@guibranco

In the dotnet-aicommitmessage project, the following message is currently used for initial commits:

initial commit - [generated description from AI]

However, this pattern should only be applied to true initial commitsβ€”not to the first commit on a feature branch that already has history. We need a way to programmatically detect whether a commit is genuinely the initial commit (in the repository or on a fresh orphan branch) and skip applying this default message otherwise.

Acceptance Criteria:

  • Detect whether the current commit is the true initial commit (e.g., by checking if there is no parent commit)
  • Detect and skip initial commit message if it's the first commit on a feature branch but not the actual root commit
  • Ensure the tool continues to generate commit messages for regular commits as expected
  • Add unit and integration tests to verify behavior for different commit scenarios

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomershacktoberfestParticipation in the Hacktoberfest eventhelp wantedExtra attention is neededπŸ“ documentationTasks related to writing or updating documentationπŸ•” high effortA task that can be completed in a few daysπŸ›  WIPWork in progress

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions