Commit graph

22 commits

Author SHA1 Message Date
moson
33d31d4117
style: Indicate deleted accounts on requests page
Show "(deleted)" on requests page for user accounts that were removed.

Fixes #505

Signed-off-by: moson <moson@archlinux.org>
2024-06-24 16:35:21 +02:00
moson
c6a530f24f
chore(deps): bump pre-commit tools/libs
Prep for python 3.12
Reformat files with latest pre-commit tools

Signed-off-by: moson <moson@archlinux.org>
2024-04-25 07:25:39 +02:00
moson
87f6791ea8
housekeep: TU rename - Comments
Changes to comments, function descriptions, etc.

Signed-off-by: moson <moson@archlinux.org>
2023-09-30 16:45:05 +02:00
moson
61f1e5b399
housekeep: TU rename - Test suite
Rename tests: Function names, variables, etc.

Signed-off-by: moson <moson@archlinux.org>
2023-09-30 16:45:05 +02:00
moson
1702075875
housekeep: TU rename - code changes
Renaming of symbols. Functions, variables, values, DB values, etc.
Basically everything that is not user-facing.

This only covers "Trusted User" things:
tests, comments, etc. will covered in a following commit.
2023-09-30 16:45:04 +02:00
moson-mo
1c11c901a2
feat: switch requests filter for pkgname to "contains"
Use "contains" filtering instead of an exact match
when a package name filter is given.

This makes it easier to find requests for a "group" of packages.

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-06-10 09:40:35 +02:00
moson-mo
f24fae0ce6
feat: Add "Requests" filter option for package name
- Add package name textbox for filtering requests (with auto-suggest)
- Make "x pending requests" a link for TU/Dev on the package details page

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-05-25 11:18:08 +02:00
moson-mo
b9df7541b3
fix: add comments in email for direct deletion/merge
TUs and Devs can delete and merge packages directly.
Currently the comments they enter, don't end up in the ML notification.

Include the comment in the notifications for direct deletion / merge

Signed-off-by: moson-mo <mo-son@mailbox.org>
2023-03-14 11:17:45 +01:00
moson-mo
a832b3cddb
fix(test): FastAPI 0.87.0 - warning fixes
FastAPI 0.87.0 switched to the httpx library for their TestClient

* cookies need to be defined on the request instance instead of method calls

Signed-off-by: moson-mo <mo-son@mailbox.org>
2022-11-24 22:43:31 +01:00
moson-mo
1216399d53
fix(test): FastAPI 0.87.0 - error fixes
FastAPI 0.87.0 switched to the httpx library for their TestClient

* allow_redirects is deprecated and replaced by follow_redirects

Signed-off-by: moson-mo <mo-son@mailbox.org>
2022-11-24 22:23:37 +01:00
Leonidas Spyropoulos
bce5b81acd
feat: allow filtering requests from maintainers
These are usually easy to handle from TUs so allow to filter for them

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2022-11-22 16:39:11 +00:00
Leonidas Spyropoulos
73f0bddf0b
fix: handle default requests when using pages
The default page shows the pending requests which were working OK if one
used the Filters button. This fixes the case when someone submits by
using the pager (Next, Last etc).

Closes: #405

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2022-11-08 13:14:42 +00:00
Leonidas Spyropoulos
b757e66997 feature: add filters and stats for requests
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2022-10-15 15:26:53 +03:00
Kevin Morris
83ddbd220f
test: get /requests displays all requests, including those without a User
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-09-05 02:56:48 -07:00
Joakim Saario
9c6c13b78a
style: Run pre-commit 2022-08-22 22:40:45 +02:00
Jelle van der Waa
a509e40474 fix(python): use standard dict/list type annotation
Since Python 3.9 list/dict can be used as type hint.
2022-08-02 12:06:58 +00:00
Kevin Morris
2cb53411c0
change: remove comaintainers when fulfilling orphan request
Closes FS#50079

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-08 20:03:38 -08:00
Kevin Morris
7f6c23d4cb
housekeep: centralize datetime generation
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-18 07:31:04 -08:00
Kevin Morris
9441f4f904
change(python): move test_requests tests to their own suite
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-15 21:52:53 -08:00
Kevin Morris
a1f46611e1
change(python): move request & pkgbase request routes
Move package request routes and related routes to their
respective routers. In addition, move some utility used
for requests over from `aurweb.packages`.

Introduced routers:
- `aurweb.routers.requests`

Introduced package:
- `aurweb.requests`

Introduced module:
- `aurweb.requests.util`

Changes:
- Moved `aurweb.packages.validate` to `aurweb.pkgbase.validate`
- Moved requests listing & request closure routes to
  `aurweb.routers.requests`
- Moved pkgbase request creation route to `aurweb.routers.pkgbase`
- Moved `get_pkgreq_by_id` from `aurweb.packages.util` to
  `aurweb.requests.util` and fixed its return type hint.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-02 01:44:36 -08:00
Kevin Morris
3a771fc807
fix(packages.requests): disown as maintainer does not need handle_requests
As a maintainer, we don't deal with requests at all.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-28 18:31:21 -08:00
Kevin Morris
26b1674c9e
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 the
  `PackageRequest.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

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-09 19:09:51 -08:00