Fix PackageRequest-based notifications
fix(requests): rework handling of requests
This commit changes several things about how we were handling package requests.
Modifications (requests):
-
/requests/{id}/close
no longer provides an Accepted selection. All manual request closures will cause a rejection. - Relevent
pkgbase
actions now trigger request closures:/pkgbase/{name}/delete
(deletion),/pkgbase/{name}/merge
(merge) and/pkgbase/{name}/disown
(orphan). - Comment fields have been added to
/pkgbase/{name}/{delete,merge,disown}
, which is used to set thePackageRequest.ClosureComment
on pending requests. If the comment field is left blank, a closure comment is autogenerated. - Autogenerated request notifications are only sent out once as a closure notification.
- Some markup has been fixed.
Modifications (disown/orphan):
- Orphan requests are now handled through the same path as deletion/merge.
- We now check for due date when disowning as non-maintainer; previously, this was only done for display and not functionally. This check applies to Trusted Users' disowning of a package.
This style of notification flow does reduce our visibility, but accounting can still be done via the close request; it includes the action, pkgbase name and the user who accepted it.
Closes #204 (closed)
Signed-off-by: Kevin Morris kevr@0cost.org
Edited by Kevin Morris