InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[contributing]: commit messages and quantity

Open psychedelicious opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Contact Details

No response

What should this feature add?

As the project grows, I wonder if we might be interested in setting some guidelines for commit messages and commit quantity (squashing PRs down to a few meaningful commits).

A popular system is conventional commits. All commits messages must follow a particular format. The type of change may optionally be followed by its scope, before a description. The description should be written in such a way that it would fit after the words "If this commit was merged, it would...".

Here are a few examples:

  • feat(diffusers): add controlnet support
  • build: exclude docs changes from actions
  • chore(ui): build frontend bundle :sweat_smile:

This can be enforced, if desired, by a pre-commit hook.

We may also want to have some soft rules about commit quantity. That would probably mean making an effort to have a single commit for a unit of change. Small fixes would always have a single commit, while large features may have several. What should be avoided are commits like "wip" or "more whatevers".

Rules and guidelines like these could help our git history to be far more approachable and useful, but could make contributing a bit more tedious, especially for new contributors.

Alternatives

No response

Aditional Content

No response

psychedelicious avatar Feb 17 '23 09:02 psychedelicious

I think anything and everything we can do to be clear about how to contribute is helpful. Cleaner commits will help with understanding changes as the project grows, and it also encourages other good hygiene elsewhere.

One 👍 here!

hipsterusername avatar Feb 17 '23 12:02 hipsterusername

I'm all in favor of increasing quality of commit messages but not a huge fan of enforcing a particular style of commit message through a pre-commit hook. I do like the "complete the sentence" suggestion for non-merging commits.

JPPhoto avatar Feb 17 '23 12:02 JPPhoto

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 04 '23 06:03 github-actions[bot]

Due to inactivity, this issue was automatically closed. If you are still experiencing the issue, please recreate the issue.

github-actions[bot] avatar Apr 02 '23 06:04 github-actions[bot]