Skip to content

cli: Add command to get info about an event type

Add "swh webhooks event-type get NAME" command to display description and JSON schema of an event type.

$ swh webhooks -C ~/.config/swh/webhooks.yml event-type get -h
Usage: swh webhooks event-type get [OPTIONS] NAME

  Get info about a webhook event type.

  NAME must be a string in the form '<group>.<event>'.

Options:
  -h, --help  Show this message and exit.
$ swh webhooks -C ~/.config/swh/webhooks.yml event-type get origin.create
Description:
  This event is triggered when a new software origin is added to the archive
JSON schema for payload:
  {
      "properties": {
          "origin_url": {
              "description": "The URL of the newly created software origin",
              "format": "iri",
              "type": "string"
          }
      },
      "required": [
          "origin_url"
      ],
      "type": "object"
  }

Depends on !7 (merged).

Related to #6.

Edited by Antoine Lambert

Merge request reports

Loading