Introduces:
- aurweb.testing.alpm.AlpmDatabase
- Used to mock up and manage a remote repository.
- templates/testing/alpm_package.j2
- Used to generate a single ALPM package desc.
- Removed aurblup sharness test
Signed-off-by: Kevin Morris <kevr@0cost.org>
These were using the old comment image sources. Slipped in
due to cache and not checking without cache.
Fixed them to use src="/static/images/...".
Signed-off-by: Kevin Morris <kevr@0cost.org>
This is needed so that users can edit comments when they don't have
Javascript being used in their browser.
Signed-off-by: Kevin Morris <kevr@0cost.org>
With this change, we've decoupled some partials shared between
`/pkgbase/{name}` and `/account/{username}/comments`. The comment
actions template now resolves its package base via the `comment`
instance instead of requiring `pkgbase`.
We've also modified the existing package comment routes to
support execution from any location using the `next` parameter.
This allows us to reuse code from package comments for
account comments actions.
Moved the majority of comment editing javascript to its own
.js file.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Two new options have been added:
- [devel] commit_url
- URL including an %s format specifier that can be used to link
to a webpage for the commit.
- [devel] commit_hash
- HEAD's commit hash (produced via `git rev-parse HEAD`)
If a `[devel] commit_hash` is configured, a link to the commit based on
`[devel] commit_url` will be displayed in the aurweb footer in
the form: `HEAD@<commit_hash>`. If no `[devel] commit_url` is
configured, a non-linked hash will be displayed.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Changes:
- `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.
Signed-off-by: Kevin Morris <kevr@0cost.org>
When using this input on `live` as a TU, the field is not
taken into account. Tried with no action and with the
Delete Packages action, which ended up deleting the packages
but not merging into the given target.
So, this commit removes that input from the page.
Signed-off-by: Kevin Morris <kevr@0cost.org>
With our FastAPI server, trailing slashes causes a 307 redirect
which ends up redirecting users to routes which do not contain
trailing slashes. This removes trailing slashes from our templates
where FastAPI is concerned to avoid unnecessary redirects.
There may still be links or usages around which have unnecessary
usages of a trailing slash; please keep a look out for these and
remove them where possible.
Signed-off-by: Kevin Morris <kevr@0cost.org>
The POST /packages route takes an `action`, `merge_into` and `confirm`
form data arguments. It then routes over to `action`'s callback provided
by `PACKAGE_ACTIONS`. This commit does not implement actions, but
mocks out the flow we would expect from the POST route.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Previously, `result` was being used which was directly set to
`pkgbase` before rendering the actions.html partial. It didn't
make much sense. This commit cleans things up a bit.
Signed-off-by: Kevin Morris <kevr@0cost.org>
In addition, we've had to add cascade arguments to backref so
sqlalchemy treats the relationships as proper cascades.
Furthermore, our pkgbase actions template was not rendering
actions properly based on TU credentials.
Signed-off-by: Kevin Morris <kevr@0cost.org>