~xenrox

Wuppertal

https://xenrox.net

~xenrox/hut-dev

Last active 9 days ago
View more

Recent activity

Re: [PATCH builds.sr.ht v2] api: Add mutation to update job visibility a month ago

From Thorben Günther to ~sircmpwn/sr.ht-dev

On Mon Nov 25, 2024 at 3:49 PM CET, Drew DeVault wrote:
> You cannot add new values to an enum type in Postgres, instead you have
> to create a new type and update the type of the column in a four step
> process:

Adding to an enum is supported by Postgres with "ALTER TYPE", only removing values
requires the four step migration. This is already used in some sourcehut migrations
(e.g. the one I did for lists [1]).

[1]: https://git.sr.ht/~sircmpwn/lists.sr.ht/commit/a438d6b68f5eb4b232e748b0d666ae5e7afc2c4c

[PATCH builds.sr.ht v3] api: Add mutation to update job visibility a month ago

From Thorben Günther to ~sircmpwn/sr.ht-dev

And route the UI's visibility change through GraphQL
---
v3: Add schema migration

 api/graph/schema.graphqls                     |  4 +++
 api/graph/schema.resolvers.go                 | 31 +++++++++++++++--
 ...bfcbb3_add_job_updated_to_webhook_event.py | 34 +++++++++++++++++++
 buildsrht/blueprints/settings.py              | 12 ++++---
 schema.sql                                    |  3 +-
 5 files changed, 77 insertions(+), 7 deletions(-)
 create mode 100644 buildsrht/alembic/versions/707deabfcbb3_add_job_updated_to_webhook_event.py

diff --git a/api/graph/schema.graphqls b/api/graph/schema.graphqls
index 0e941f7..8cc56b7 100644
[message trimmed]

[PATCH builds.sr.ht v2] api: Add mutation to update job visibility a month ago

From Thorben Günther to ~sircmpwn/sr.ht-dev

And route the UI's visibility change through GraphQL
---
 api/graph/schema.graphqls        |  4 ++++
 api/graph/schema.resolvers.go    | 31 +++++++++++++++++++++++++++++--
 buildsrht/blueprints/settings.py | 12 ++++++++----
 3 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/api/graph/schema.graphqls b/api/graph/schema.graphqls
index 0e941f7..8cc56b7 100644
--- a/api/graph/schema.graphqls
+++ b/api/graph/schema.graphqls
@@ -283,6 +283,7 @@ type OAuthClient {

enum WebhookEvent {
[message trimmed]

[PATCH builds.sr.ht] blueprints: Update job visibility with GraphQL a month ago

From Thorben Günther to ~sircmpwn/sr.ht-dev

---
 buildsrht/blueprints/settings.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/buildsrht/blueprints/settings.py b/buildsrht/blueprints/settings.py
index 0368a5c..779616f 100644
--- a/buildsrht/blueprints/settings.py
@@ -1,6 +1,6 @@
from flask import Blueprint, current_app, render_template, request, url_for, abort, redirect
from flask import current_app
from srht.database import db
from srht.graphql import exec_gql
from srht.oauth import current_user, loginrequired
[message trimmed]

Re: [PATCH builds.sr.ht] api: Add mutation to update job visibility a month ago

From Thorben Günther to ~sircmpwn/sr.ht-dev

On Thu Nov 21, 2024 at 3:13 PM CET, Drew DeVault wrote:
> LGTM, but if we're adding a JOB_UPDATED GQL webhook, then we have to
> update the web UI's visibility change to be routed through GQL so that
> the webhook is delivered appropriately when updating visibility from the
> web.

Will send a follow-up patch.

[PATCH builds.sr.ht] api: Add mutation to update job visibility a month ago

From Thorben Günther to ~sircmpwn/sr.ht-dev

---
This feature was requested by hut users.
If you prefer, I can modify this patch to use an input struct instead of just the
visibility.

 api/graph/schema.graphqls     |  4 ++++
 api/graph/schema.resolvers.go | 31 +++++++++++++++++++++++++++++--
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/api/graph/schema.graphqls b/api/graph/schema.graphqls
index 0e941f7..8cc56b7 100644
--- a/api/graph/schema.graphqls
+++ b/api/graph/schema.graphqls
@@ -283,6 +283,7 @@ type OAuthClient {
[message trimmed]

Re: [PATCH v2] Add --web flag 2 months ago

From Thorben Günther to ~xenrox/hut-dev

Pushed, thanks!

I have made one slight modification to the man page, so that "[options...]"
is not missing for git/todo ticket show.

Re: [PATCH] Add --web flag 2 months ago

From Thorben Günther to ~xenrox/hut-dev

Thank you for this patch!

On Tue Oct 8, 2024 at 10:47 PM CEST, Tim Hårek Andreassen wrote:

> @@ -359,6 +359,7 @@ func newBuildsShowCommand() *cobra.Command {
>  		Run:               run,
>  	}
>  	cmd.Flags().BoolVarP(&follow, "follow", "f", false, "follow job status")
> +	cmd.Flags().Bool("web", false, "open in browser")
>  	return cmd
>  }

You are only adding the flag here, the implementation to actually open the
URL is missing.

Re: [PATCH 2/2] git: iterate over all remotes 4 months ago

From Thorben Günther to ~xenrox/hut-dev

Both pushed, thank you!

Re: Pruning unreachable commits from Git repositories 4 months ago

From Thorben Günther to ~sircmpwn/sr.ht-discuss

On Mon Sep 2, 2024 at 9:35 PM CEST, Zack Weinberg wrote:
> Do you know for certain that at present there is no other way to do this?

Well you can try to reach the support and ask there:
~sircmpwn/sr.ht-support@lists.sr.ht