diff --git a/modules/ROOT/assets/images/webhook_forgejo_01.png b/modules/ROOT/assets/images/webhook_forgejo_01.png new file mode 100644 index 0000000..418b9ca Binary files /dev/null and b/modules/ROOT/assets/images/webhook_forgejo_01.png differ diff --git a/modules/ROOT/assets/images/webhook_forgejo_02.png b/modules/ROOT/assets/images/webhook_forgejo_02.png new file mode 100644 index 0000000..745f56d Binary files /dev/null and b/modules/ROOT/assets/images/webhook_forgejo_02.png differ diff --git a/modules/ROOT/assets/images/webhook_forgejo_03.png b/modules/ROOT/assets/images/webhook_forgejo_03.png new file mode 100644 index 0000000..768fbdc Binary files /dev/null and b/modules/ROOT/assets/images/webhook_forgejo_03.png differ diff --git a/modules/ROOT/assets/images/webhook_forgejo_04.png b/modules/ROOT/assets/images/webhook_forgejo_04.png new file mode 100644 index 0000000..b4b3f9b Binary files /dev/null and b/modules/ROOT/assets/images/webhook_forgejo_04.png differ diff --git a/modules/ROOT/assets/images/webhook_forgejo_05.png b/modules/ROOT/assets/images/webhook_forgejo_05.png new file mode 100644 index 0000000..c2a1458 Binary files /dev/null and b/modules/ROOT/assets/images/webhook_forgejo_05.png differ diff --git a/modules/ROOT/assets/images/webhook_forgejo_06.png b/modules/ROOT/assets/images/webhook_forgejo_06.png new file mode 100644 index 0000000..ed2e11b Binary files /dev/null and b/modules/ROOT/assets/images/webhook_forgejo_06.png differ diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 2162537..4038848 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -8,6 +8,7 @@ ** xref:email_notifications.adoc[Email Notifications] ** xref:matrix_notifications.adoc[Matrix Notifications] ** xref:issue_pull_request_templates.adoc[Issue and Pull Request Templates] + ** xref:webhook_to_fedora_messaging.adoc[Webhook to Fedora Messaging for Forgejo] ** xref:migration/pagure.adoc[Migrating from Pagure] *** xref:migration/pagure_repository.adoc[Migrate Repository from Pagure] *** xref:migration/pagure_private_tickets.adoc[Migrate Private Tickets from Pagure] diff --git a/modules/ROOT/pages/webhook_to_fedora_messaging.adoc b/modules/ROOT/pages/webhook_to_fedora_messaging.adoc new file mode 100644 index 0000000..2bd9d8f --- /dev/null +++ b/modules/ROOT/pages/webhook_to_fedora_messaging.adoc @@ -0,0 +1,74 @@ += Webhook to Fedora Messaging for Forgejo + +[WARNING] +==== +**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 + +. Create a webhook bind under the type **Forgejo** on the link:https://webhook.fedoraproject.org/[Webhook to Fedora Messaging dashboard] with a unique name and an appropriate description. + +. Navigate to the project repository on **Forgejo**. ++ +image::webhook_forgejo_01.png[Navigate to the project repository] + +. On the **Settings** page, navigate to the **Webhooks** section. ++ +image::webhook_forgejo_02.png[Navigate to the Webhooks section] + +. Click on the **Add webhook** button to open the combobox. ++ +image::webhook_forgejo_03.png[Click the Add webhook button] + +. Select the **Forgejo** option there to begin. ++ +image::webhook_forgejo_04.png[Select the Forgejo option] + +. Fill the information accurately from the created webhook bind. ++ +image::webhook_forgejo_05.png[Fill in the webhook information] + +. After saving, the webhook bind should be enabled. ++ +image::webhook_forgejo_06.png[Webhook bind enabled] + +== Supported Events + +Perform one of the following actions for triggering the events. + +=== Push + +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.push[`org.fedoraproject.prod.forgejo.push`] topic. + +=== Pull Request + +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.pull_request[`org.fedoraproject.prod.forgejo.pull_request`] topic. + +=== Issue Ticket + +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.issues[`org.fedoraproject.prod.forgejo.issues`] topic. + +=== Issue Comment + +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.issue_comment[`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 link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.action_run_success[`org.fedoraproject.prod.forgejo.action_run_success`] topic. + +Failure:: +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.action_run_failure[`org.fedoraproject.prod.forgejo.action_run_failure`] topic. + +Recover:: +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.action_run_recover[`org.fedoraproject.prod.forgejo.action_run_recover`] topic. + +Cancelled:: +Events catalogued under the link:https://apps.fedoraproject.org/datagrepper/v2/search?topic=org.fedoraproject.prod.forgejo.action_run_cancelled[`org.fedoraproject.prod.forgejo.action_run_cancelled`] topic.