maubot / gitlab

A GitLab client and webhook receiver for maubot.
GNU Affero General Public License v3.0
95 stars 30 forks source link

"webhook add" only allows either URL or repository (not both) #51

Open sumpfralle opened 3 years ago

sumpfralle commented 3 years ago

Currently the following command is rejected with a syntax error:

!gitlab webhook add SOME_ALIAS REPOSITORY/PATH/

The error message is the following:

Usage: !webhook add [server URL or alias] [repository]

The error message is confusing, since it seems to allow to specify a server alias (or URL) followed by the repository. But in fact it seems to allow only one of these two optional arguments.

Thus the following should be more appropriate:

Usage: !webhook add [server URL or alias | repository]

Of course it would be even better to allow both a URL and a repository. Maybe keyword-based assignments (e.g. server=foo repo=something/) could make this possible.

wolfspyre commented 2 months ago

I believe the issue is that the webhook add command only works when issued as: !gitlab webhook add https://gitlab-host-fqdn-here path/to/repo/to/webhookify

it doesn't seem to work with aliases or just hostnames... needs the proto too.

ADDITIONALLY the help dialog asserts the command is '!webhook' which is misleading, as it only works as !gitlab webhook ...