Skip to content

feat(FastAPI): add /pkgbase/{name}/merge (post)

Kevin Morris requested to merge kevr/aurweb:pu_pkgbase_merge_post into pu

With this implementation, we:

  1. Create a PackageRequest if none exist.
  2. Migrate comments, notifications and votes from PackageBaseName to MergeBaseName.
  3. Close all related PackageRequests as Accepted.
  4. Send notifications about the PackageRequests we made and updated.

Additionally:

  • via is not required in FastAPI. We deduce the involved requests via their PackageBaseName / MergeBaseName columns and set them to Accepted when merged.
  • When erroneous input is given, the error is now presented on the merge page instead of sending the user to the pkgbase page.

We also log a message out about who merged the packages.

Edited by Kevin Morris

Merge request reports