add document about configuring nonbot webhook

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
Ryan Lerch 2025-11-17 17:42:27 +10:00
commit 5883305cdf
2 changed files with 101 additions and 0 deletions

View file

@ -6,6 +6,7 @@
** xref:team_permissions_management.adoc[Team Membership Management with Fedora Accounts]
** xref:using_http_auth.adoc[How to Clone a Repo with HTTPS]
** xref:email_notifications.adoc[Email Notifications]
** xref:matrix_notifications.adoc[Matrix Notifications]
** xref:issue_pull_request_templates.adoc[Issue and Pull Request Templates]
** xref:migration/pagure.adoc[Migrating from Pagure]
*** xref:migration/pagure_repository.adoc[Migrate Repository from Pagure]

View file

@ -0,0 +1,100 @@
include::partial$attributes.adoc[]
= Setting Up Matrix Notifications for Your Repository
[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 provides a comprehensive guide for setting up automated Matrix notifications for your Fedora Forge repository using the custom nonbot webhook. This allows you to receive real-time notifications about repository activities directly in your Matrix chat rooms.
== Scope
This guide is intended for Fedora Project contributors and repository owners who want to configure automated Matrix notifications for:
* Issue creation, updates, and closures
* Pull request events (opened, merged, closed, reviewed)
* Push events and commits
* Release notifications
* Repository events (forks, stars)
== Prerequisites
Before setting up Matrix notifications, you need:
* *Repository Access:* You must have admin or owner permissions on the repository
* *Matrix Room:* A Matrix room where you want to receive notifications
* *Nonbot in your Matrix room* the nonbot user needs to be a member of your matrix room. File a ticket on link:https://pagure.io/fedora-infrastructure/issues[fedora infra] to get an admin to add nonbot to your room.
* *Room ID:* The internal room ID for your Matrix room (see <<obtaining-room-id,Obtaining Your Room ID>>)
[[obtaining-room-id]]
== Obtaining Your Room ID
To configure the webhook, you need your Matrix room's internal ID.
. Open your Matrix room in link:https://app.element.io/[Element]
. Click the room name at the top to open *Room Settings*
. Navigate to *Settings* → *Advanced*
. Look for *Internal room ID* (it will look like `!BZXFjVQIigxSjizirN:fedora.im`)
. Copy the entire room ID including the `!` and `:fedora.im`
== Setting Up the Nonbot Webhook
=== Step 1: Navigate to Webhook Settings
. Log into link:https://forge.fedoraproject.org/[Fedora Forge] using your Fedora Account
. Navigate to your repository
. Click on *Settings* in the repository navigation menu
. In the left sidebar, click on *Webhooks*
. Click the *Add Webhook* button
. Select *Nonbot* from the webhook type dropdown
=== Step 2: Configure the Webhook
On the webhook configuration page, you'll need to provide:
==== Target URL (Matrix Room ID)
Enter your Matrix room ID in the *Target URL* field:
[source]
----
!abc123xyz:fedora.im
----
==== Message Type
Choose the Matrix message type for notifications:
* *Notice (m.notice)*: Recommended for automated messages. These messages typically won't trigger notification sounds or badges in Matrix clients.
* *Text (m.text)*: Regular text messages that will trigger normal notifications. Use this if you want notifications to be more prominent.
=== Step 3: Select Trigger Events
Choose which repository events should trigger Matrix notifications.
=== Step 4: Finalize and Test
. Review your webhook configuration
. Click *Add Webhook* to save the configuration
. The webhook will appear in your webhooks list with a green checkmark if configured correctly
==== Testing Your Webhook
To verify the webhook is working:
. Click on the webhook in the webhooks list
. Scroll to the *Recent Deliveries* section
. Click *Test Delivery* button
. Click *Test*
. Check your Matrix room for a test notification
[NOTE]
====
If the test delivery shows a green checkmark, your webhook is configured correctly. If you see a red X, check the delivery details for error information.
====