~xenrox/hut

Switch to gqlclient fork
settings update: New command
Don't hide resource selection from user

The old behaviour auto-linked a resource (project, mailing list, tracker)
if there was only one result.
With the new implementation the user has to explicitly confirm the
selection.
settings show: New command

Add a command that displays repo-specific hut settings.
833c4f4c — Simon Martin a month ago
Add commands to show webhooks

It's possible to create/list/delete webhooks for git, lists and
trackers, but not see their definition.

This patch adds a `webhook show <ID>` subcommand for each of those
services.

Signed-off-by: Simon Martin <simon@nasilyan.com>
8ea6325a — Simon Martin a month ago
Add commands to show user-webhooks

It's possible to create/list/delete user-webhooks for builds, hg, git,
lists, meta, pages, pastes and trackers, but not see their definition.

This patch adds a `user-webhook show <ID>` subcommand for each of those
services.

Signed-off-by: Simon Martin <simon@nasilyan.com>
1f26502a — Simon Martin a month ago
todo: don't crash listing ticket webhooks for unknown ticket

We currently crash upon `hut todo ticket webhook list -t test_hut_1 12`
if there's no ticket 12 in the test_hut_1 tracker.

Let's gracefully error instead.

Signed-off-by: Simon Martin <simon@nasilyan.com>
6ad3953a — Nathaniel Cook a month ago
todo: support ticket edit from stdin

Prior to this change a ticket could be created via stdin however a
ticket edit required the $EDITOR. This change allows for editing an
existing ticket the same way a new ticket is created from stdin. Namely
the first line is the ticket subject, the remaining lines are the
description.
Save project to settings as well

Since getProjectFromRepo can now return "nil" for the client if
the project gets retrieved from the settings, we need to switch to
using hubClient. hubClient is guaranteed to be defined.
ui: Print resource description under name

This provides more information for users to decide which resource to
select.

Acked-by: Simon Martin <simon@nasilyan.com>
Set a theme for huh's NewSelect

For convenience sake this uses a simple wrapper function.
lists: Set "git config sendemail.to" if a mailing list can be determined
lists: Try to retrieve mailing list from project
todo ticket show: Set missing owner after error checks

With the original code both user and tracker could be nil.

Fixes: https://todo.sr.ht/~xenrox/hut/73
lists: Fix new parseMailingListName usage

Oops, forgot to rebase.
lists: Refactor to use "resource" instead of name, owner, instance
7192c4a9 — Simon Martin 2 months ago
lists, todo: add command to update user permissions

We can currently list and delete user ACLs for lists and trackers, but
not update them; this patch addresses this gap.

Signed-off-by: Simon Martin <simon@nasilyan.com>
todo: Slightly improve tracker detection

I have added a check for projects without any linked trackers.
Otherwise, the user would be presented with an empty selection menu.
Besides the code was simplified.
todo: Don't assume that tracker name equals project name

Instead, retrieve all projects that a git repo is linked to.
Next