• thenextguy@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    1 day ago

    The bigger problem by far in my experience is getting devs to write more than ‘fixed bugs’ or other meaningless drivel. Trying to get them to conform to any standard like this would be impossible unless enforced by some commit hook (dear god no!).

    Even this new ‘standard’ shows the commit body as [optional]. The first line in a git commit is supposed to be a short summary, not the entire message. I try to write whole sentences, paragraphs and bullet lists in anything that isn’t trivial.

    My last job enforced a Jira ticket number looking thing, but didn’t actually check that it was a valid ticket. The number of times I would read a commit message with zero content, then go to jira to find some reference and either find the wrong ticket, or perhaps the right ticket, but still no description, … too damn high!

    • Kache@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago

      If devs on the team have trouble writing good commit messages, forcing input won’t really help

      IMO would be better off auto-pulling names of components that were touched into the message.

    • atzanteol@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 day ago

      Oddly enough the folks I work with are really good at the Jira ticket thing and frankly it’s much more useful than “feat” prefixes on everything. Because the Jira ticket gives me a “why” which can be amazingly helpful when trying to figure out “why was this line added”.

      I have never once found feat/fix/chore to be of any use when looking at history. It’s useless noise.

      • nebeker@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        12 hours ago

        I’m OK with Jira ticket for branch names and pull requests. If something needs paragraphs to explain it, it should be a ticket. By all means copy that to the pull request and then have it in the merge (or squash commit).

        If fact, I think I’ll suggest we automate that in my org - we’ve lived through a TFS to Jira migrations and it’s a lot harder to track down the original info now. If you migrate from GitHub to GitLab or ForgeJo, that’s one more layer of business knowledge and motivation that gets lost.

        Either way, I’m on board with a simple “Fixed API routing” or “Improved Artist card reflow” message. If I’m reading it, I’m already looking at the routes or the CSS.

      • morbidcactus@lemmy.ca
        link
        fedilink
        arrow-up
        2
        ·
        15 hours ago

        One thing I’ve found useful with some git forges (haven’t tried them all so no idea if it’s universal) is tagging commits to issues and/or prs. Never bothered with the auto close functionality but assuming people actually put details into tickets, it’s come in handy a bunch of times this year to figure out why something got implemented when the original contributor is long gone.