repoman -M template file currently supports a "cat/pkg: " special string for substituting it with the category and package for the message. It would be nice if it also supported a version that includes the version number in the substitution when a single ebuild is updated. So e.g when keywording foo/bar-1.0 ~arm64 I could use a template like: "cat/pkg-ver: keyworded for ~arm64" and get "foo/bar-1.0-r0: keyworded for ~arm64" as a result, like Blackb|rd's scripts do, which is very nice for git shortlog. I suppose if it happens to touch multiple versions, it would skip the version/revision even if in template and fallback as if the template had "cat/pkg: ", as multiple revisions are touched (potentially with a fallback to not specify the revision if all touched revisions are for the same version). This would allow us to do simple repoman commit -M scripting without rolling it manually to achieve this nicer message for better shortlog.
I think that policy for repository gentoo is to use "${CATEGORY}/${PN}: " prefix without "-${PV}" or "-${PVR}". You can use something like "${CATEGORY}/${PN}: Keyworded 1.0 for ~arm64".
There is no such policy that I know of, just an example that happens to not include version number, as the example if probably more about a version bump or something. And if there is such a policy, then it's wrong, considering what the convention for these things is in the git world - to signify what is changed (and a keywording is a change to a concrete package version/revision; while a bump could be considered a version bump for the whole package)
Additionally I still don't have access to the version touched in repoman -M, so that means I wouldn't be able to use repoman -M still, having to roll own scripts for no good reason when repoman -M is supposed to be helpful here.
See section "Git Commit Message Format" in https://devmanual.gentoo.org/ebuild-maintenance/index.html
Yes, "The summary line should start with referencing what is affected by the change followed by a colon ':' character." - so "cat/pkg-ver:", which is the thing affected by the change. Either way, I can't do "${CATEGORY}/${PN}: Keyworded 1.0 for ~arm64" either with repoman -M as I can't template the 1.0 anywhere; prefix or not.
It could be possible to check for cat/pkg-ver: in the start of the commit message. The main problem I see is it will take a bunch more code to determine the correct version. Not just to get the version, but to ensure that there is only one ebuild being modified. It is quite easy for repoman to get cat/pkg as it is very generic (simple directory lookup). I'll have to think about getting the version from the files list for the commit. It may not be too costly/painful. Of course patches/contributions are always welcome.
It might be nice to have some generic variable substitution in some form indeed, not just if it happens to be exactly line this at the very beginning. While for keywording/stabling I might like to tuck it before the ':', then for example with bumping I'd want to use "cat/pkg: bump to ${PV}", which I could then do via repoman -M template instead (of course then just a simple substitution of "ver" won't work out, as it might substitute things not wanted). I already use this, but it's only useful when doing some sort of batch bumping, like my gstreamer@ stuff, as I need to prepare the template file first and it is beneficial only thanks to it involving 70 packages that are getting all bumped to same version number due to the fact of tarball splitting.
repoman support has been removed per bug 835013. Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.