I'm attaching a patch which adds support for closing bugs with different resolutions via extended commit tags. I also opened an accompanying PR for pkgdev[1]. As discussed on the mailing list[2], the syntax would look like this: "Closes: <bgo-url> (<case-insensitive resolution>)" A tagged bug without a resolution implicitly gets the FIXED one. I tested these changes locally as best as I could, but I wasn't sure how this hook integrates with the rest of Gentoo's infra, so I didn't do integration tests. It'd be great, if someone could help me with that. Thanks! [1]: https://github.com/pkgcore/pkgdev/pull/190 [2]: https://marc.info/?l=gentoo-dev&m=171867168226556&w=2 Reproducible: Always
Created attachment 896371 [details, diff] Patch for commit tags with resolutions FIXED, OBSOLETE, PKGREMOVED
Looks good at a first place, but I need to verify it much more closely given the sensitivity here. Thank you for being one of the few external contributors to the githooks repo in a long time.
Any reason to allow only a subset of resolutions? I'm not arguing that we need to use all of them but I think this is going to be against the principle of least surprise -- and at some point, will inevitably lead to people pushing commits with an "incorrect" resolution.
(In reply to Michał Górny from comment #3) > Any reason to allow only a subset of resolutions? I'm not arguing that we > need to use all of them... No real reason. I just couldn't come up with scenarios for the other resolutions, where one would push a commit to close a bug and mark it resolved as such. > but I think this is going to be against the > principle of least surprise -- and at some point, will inevitably lead to > people pushing commits with an "incorrect" resolution. You are right. There's no harm if githooks and possibly pkgdev handle all known resolutions.
Patch approved as-is, please merge this, and put other resolutions in another commit.
Pushed and tagged infra/githooks https://gitweb.gentoo.org/infra/githooks.git/commit/?id=2070024ab28255e44bec58202b0494edcdb1e1b7 Also updated in internal infra/puppet repo (commit id 724bb0c498b72145b0b852414e33f48c4df83a88). Thank you very much!