Commit graph

285 commits

Author SHA1 Message Date
Drew DeVault
48851d201d Upgrade core-go 2024-11-25 13:20:40 +01:00
Drew DeVault
5168731e99 Reduce scope of user_type 2024-11-22 14:47:05 +01:00
Drew DeVault
54567b6cbe go.mod: upgrade core-go 2024-11-11 14:07:10 +01:00
Drew DeVault
13d344643a Convert user_type to pg enum 2024-11-11 14:07:10 +01:00
Conrad Hoffmann
5800e3f2e5 Reduce setup.py to a stub
All configuration is now in pyproject.toml, all tooling set up to use
it. The stub remains (for now) to execute the call to `make`, as such
calls are not supported by pyproject.toml.
2024-11-08 13:17:58 +01:00
Drew DeVault
065695b30a alembic: fix revision lineage
This is going to keep biting me in the ass forever.
2024-11-07 13:55:47 +01:00
Drew DeVault
5b4afe3450 Drop oauth_revocation_token column 2024-11-07 13:52:40 +01:00
Conrad Hoffmann
597f17e1f0 Preparations for PEP440 support
Currrently, builds for patches are broken because the version numbers
generated for them are not valid according to PEP 440 [1].

This has to be solved in several steps, in coordination with the
packaging code. Procedure will be the same as for core.sr.ht:

https://git.sr.ht/~sircmpwn/core.sr.ht/commit/57ee3427

The only difference is that the extra build step (running `make`) will
remain in `setup.py` (as there is no generic mechanism for this in
`pyproject.toml`). This just means the build process will still always
have to be performed with setuptools as backend.

[1] https://peps.python.org/pep-0440
2024-10-28 11:10:08 +01:00
Drew DeVault
fdfff83511 services.py: remove unused imports 2024-09-24 13:42:16 +02:00
Drew DeVault
a4c2534641 services.py: replace build actions with GQL 2024-09-24 13:40:43 +02:00
Drew DeVault
52c105745c services.py: replace todo legacy usage with GQL 2024-09-23 12:48:28 +02:00
Drew DeVault
ceed6bdfea services.py: fetch hg README via GQL 2024-09-23 12:06:22 +02:00
Drew DeVault
a4a14dfce9 webhooks.py: we'll get this right eventually 2024-09-16 12:28:46 +02:00
Drew DeVault
775c07a21a webhooks.py: fetch submitter from payload 2024-09-16 11:03:49 +02:00
Drew DeVault
de066db3b1 webhooks.py: additional todo edge cases 2024-09-16 10:04:54 +02:00
Drew DeVault
7557942a8e webhooks.py: handle emailed tickets without name 2024-09-15 14:17:20 +02:00
Drew DeVault
086fb7b785 webhooks.py: fix todo events via email 2024-09-12 11:30:55 +02:00
Drew DeVault
b042f6dfc6 services.py: fix variable name 2024-09-10 10:50:42 +02:00
Drew DeVault
9edc23591e services.py: correct GQL variable name for CreateTool 2024-09-10 09:21:58 +02:00
Drew DeVault
f333e1ed55 services.py: rewrite legacy API usage
This leaves in place some legacy API use regarding the handling of
ticket references in git commits, which is a bit more complex to address
and will be handled in a follow-up patch.
2024-08-27 10:53:59 +02:00
Drew DeVault
4711f3faa7 Upgrade to Alpine 3.20 2024-08-05 15:22:13 +02:00
Drew DeVault
95513e1324 services.py: further GraphQL refactoring
This refines the approach to make it more general and updates all
git.sr.ht usage to be routed through GraphQL, save webhooks which will
be addressed later.
2024-07-25 14:17:29 +02:00
Drew DeVault
840a8b829e services.py: use GQL to fetch git repos 2024-07-25 12:07:10 +02:00
Drew DeVault
89b68f1d87 services.py: fetch *.yaml manifests for patch builds 2024-07-15 13:39:23 +02:00
Drew DeVault
ca022e0f16 .builds/alpine.yml: use upgrade -Ua 2024-03-20 14:43:54 +01:00
Drew DeVault
e687998c9f Upgrade to Alpine 3.19 2024-03-20 14:41:58 +01:00
Conrad Hoffmann
9670ee1409 Do not show profiles of suspended accounts
This should likely be extended to other services as well, but the hub is
certainly a good point to start.
2024-02-09 11:25:04 +01:00
Drew DeVault
32bedb1524 .builds: drop debian, arch 2024-02-09 10:21:40 +01:00
Josh
e6d32fb392 Use internal origins for service APIs
These origins are only ever used to access the REST APIs and need to be
resolvable internally.
2024-02-07 21:11:12 +01:00
Simon Ser
871c91cf51 Upgrade dependencies 2024-01-31 09:14:56 +01:00
Drew DeVault
c85b4182a6 Revert "users.summary_GET: fetch user details via GQL"
This reverts commit 52c5caecb4.

Breaks access for non-logged-in users.
2024-01-18 11:09:03 +01:00
Drew DeVault
52c5caecb4 users.summary_GET: fetch user details via GQL 2024-01-18 10:53:47 +01:00
Simon Ser
cd2e5b15bd go get -u 2023-12-21 14:54:19 +01:00
Drew DeVault
ba1e43917b Fix conn.execute with new SQLAlchemy version 2023-10-31 08:55:03 +01:00
Adnan Maolood
8deee3476d Move go.mod to root 2023-06-01 12:27:24 +02:00
Adnan Maolood
c4e50c633e hubsrht: Use repository visibility for builds 2023-04-19 09:22:20 +02:00
Drew DeVault
f362bd8835 Upgrade to Alpine 3.17 2023-03-22 12:17:05 +01:00
Vlad-Stefan Harbuz
fb56d7ba60 add project RSS feed
Signed-off-by: Vlad-Stefan Harbuz <vlad@vladh.net>
2023-02-22 09:18:52 +01:00
Conrad Hoffmann
fce16cc33e Use uppercase string for icon in patchset update
In GraphQL, the icon has to be uppercase [1]. However, the builds worker
uses the `JobContext.Job.Status` field in the payload [2], where the
value is lowercase [3]. Hence, upper-case the value before sending it to
the GraphQL API.

[1] https://git.sr.ht/~sircmpwn/lists.sr.ht/tree/master/item/api/graph/schema.graphqls#L468-474
[2] https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/item/worker/triggers.go#L251
[3] https://git.sr.ht/~sircmpwn/builds.sr.ht/tree/master/item/worker/triggers.go#L109
2022-12-02 12:27:38 +01:00
Conrad Hoffmann
ec7a552ffc webhooks: add error handling for patch submission
Currently, any 400 error that occurs will be swallowed by
`SrhtService.post()` [1] - the caller must use a validation object to
become aware of an error.

This commit adds such error handling by means of a validation object to
the build submission webhook.

[1]: https://git.sr.ht/~sircmpwn/hub.sr.ht/tree/f37b9e6e/item/hubsrht/services.py#L56-60
2022-11-25 10:24:17 +01:00
Drew DeVault
f37b9e6e18 Update patchset build submission to use GQL API 2022-11-09 11:53:43 +01:00
Adnan Maolood
e2dbb6c316 API: implement user account deletion 2022-11-02 11:57:24 +01:00
Adnan Maolood
0f2393ea80 hubsrht: Use canonical user IDs
Update user IDs across all of hub.sr.ht to match those of meta.sr.ht.
2022-10-25 11:00:27 +02:00
Adnan Maolood
638a05c8df hubsrht: Expect valid canonical name in URLs 2022-09-06 15:39:24 +02:00
Adnan Maolood
2f890ff9d3 Add schema.sql 2022-08-17 10:06:27 +02:00
Simon Ser
820b86cf9a Handle Closes commit trailers
References: c4bfcd1ff7
2022-07-26 13:43:56 +02:00
Adnan Maolood
16dea8ac4d hubsrht: Match projects case-sensitively 2022-07-06 10:29:31 +02:00
Conrad Hoffmann
d637723564 Uppercase the Visibility enum keys
There is currently a mismatch, causing for example project creation via
the web interface to fail, because the validation code is using the enum
keys, which are lowercase, but everything else uses uppercase.

Simply use uppercase everywhere, like already the case in other
services.
2022-07-01 09:18:57 +02:00
Adnan Maolood
7e78dc04d9 hubsrht/blueprints/sources: Fix visibility 2022-06-29 18:05:26 +02:00
Adnan Maolood
4e4f17770b hubsrht/blueprints/webhooks: Fix visibility 2022-06-29 18:05:26 +02:00