Webhook to Fedora Messaging for Forgejo

DRAFT DOCUMENTATION: This documentation is currently in draft form and may not be fully tested and correct. Please verify all procedures before use and report any issues or inaccuracies.

Purpose

This document explains how to quickly establish events from a Forgejo repository to be conveyed to the Fedora Messaging bus.

Setting Up the Webhook

  1. Create a webhook bind under the type Forgejo on the Webhook to Fedora Messaging dashboard with a unique name and an appropriate description.

  2. Navigate to the project repository on Forgejo.

    Navigate to the project repository
  3. On the Settings page, navigate to the Webhooks section.

    Navigate to the Webhooks section
  4. Click on the Add webhook button to open the combobox.

    Click the Add webhook button
  5. Select the Forgejo option there to begin.

    Select the Forgejo option
  6. Fill the information accurately from the created webhook bind.

    Fill in the webhook information
  7. After saving, the webhook bind should be enabled.

    Webhook bind enabled

Supported Events

Perform one of the following actions for triggering the events.

Push

Events catalogued under the org.fedoraproject.prod.forgejo.push topic.

Pull Request

Events catalogued under the org.fedoraproject.prod.forgejo.pull_request topic.

Issue Ticket

Events catalogued under the org.fedoraproject.prod.forgejo.issues topic.

Issue Comment

Events catalogued under the org.fedoraproject.prod.forgejo.issue_comment topic.

Action Runs

Workflow execution events are catalogued under the following topics based on their outcome.

Success

Events catalogued under the org.fedoraproject.prod.forgejo.action_run_success topic.

Failure

Events catalogued under the org.fedoraproject.prod.forgejo.action_run_failure topic.

Recover

Events catalogued under the org.fedoraproject.prod.forgejo.action_run_recover topic.

Cancelled

Events catalogued under the org.fedoraproject.prod.forgejo.action_run_cancelled topic.