Skip to content

Switching to conventional commits #73

@ROpdebee

Description

@ROpdebee

I've been using a whole range of different commit message styles, and it makes me cringe a little each time. I should switch to conventional commits instead.

Pros:

  • Semantic commit messages
  • Would integrate nicely with a future Continuous Deployment workflow
  • Possibly changelogs?

Cons:

  • It's a change to the dev workflow, albeit IMO just a minor one
  • It'll take a bit of getting used to, but I'm sure we could set up a commit message linter in CI and/or a pre-commit hook to enforce it

Conventional commits is often paired with SemVer, but I have no intention of switching over to SemVer. It doesn't make sense for userscripts IMO, and that would lead to lots of issues with auto-updating unless you start with major version 2022. Regardless, there's still other benefits of conventional commits.

Not sure how we should handle scopes though. Currently I'm mostly annotating commits that touch a certain userscript with a sort-of arbitrary prefix (e.g. [caa upload] for ECAU), I think it'd make sense to carry that over into the scopes since this is a monorepo of different userscripts, after all. However, I'm not sure what'd be a good scope name for e.g. ECAU.

  • Using mb_enhanced_cover_art_uploads would lead to commit headers that are far too long (I don't like the look of feat(mb_enhanced_cover_art_uploads): Add some provider)
  • Using ecau feels like a bad idea because it's not obvious what ecau stands for, and I've only been using that initialism for just a couple of days in absense of a better shorthand
  • Continuing to use caa uploads would probably be the better option, but it kind of feels too "broad" of a name.

That's not even mentioning all the other scripts:

  • mb_blind_votes.user.js -> blind votes (seems OK)
  • mb_bulk_copy_work_codes.user.js -> work codes? A bit too broad, IMO.
  • mb_caa_dimensions.user.js -> caa dims (seems OK too)
  • mb_collapse_work_attributes.user.js -> Currently using collapse work attrs, but that's a bit long. Also have used coll work attrs but coll is ambiguous (could stand for collection too)
  • mb_multi_external_links.user.js -> No clue, none in use yet. split links?
  • mb_qol_inline_recording_tracks.user.js -> None yet.
  • mb_qol_seed_recording_disambiguation.user.js -> seed rec comments currently
  • mb_qol_select_all_update_recordings.user.js -> None yet.
  • mb_supercharged_caa_edits.user.js -> caa edits currently, a bit too similar to caa uploads IMO.
  • mb_validate_work_codes.user.js -> validate work attrs/validate work codes currently, too long. It may make sense to eventually merge this script with mb_bulk_copy_work_codes to create a larger script.

@kellnerd, since you're the only other person that's committing to this repo, your opinion matters a lot in this too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions