Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934825 - githooks: add support for commit tags with resolutions FIXED, OBSOLETE, PKGREMOVED
Summary: githooks: add support for commit tags with resolutions FIXED, OBSOLETE, PKGRE...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-06-25 03:04 UTC by Lucio Sauer
Modified: 2024-07-21 01:35 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for commit tags with resolutions FIXED, OBSOLETE, PKGREMOVED (0001-local-add-support-for-commit-tags-with-resolutions-F.patch,3.08 KB, patch)
2024-06-25 03:08 UTC, Lucio Sauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lucio Sauer 2024-06-25 03:04:00 UTC
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
Comment 1 Lucio Sauer 2024-06-25 03:08:13 UTC
Created attachment 896371 [details, diff]
Patch for commit tags with resolutions FIXED, OBSOLETE, PKGREMOVED
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2024-06-25 05:17:52 UTC
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.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-06-25 05:33:02 UTC
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.
Comment 4 Lucio Sauer 2024-06-26 00:25:22 UTC
(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.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2024-07-19 19:37:58 UTC
Patch approved as-is, please merge this, and put other resolutions in another commit.
Comment 6 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2024-07-20 06:02:25 UTC
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!