Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Documentation/Howto/RenderingDocs/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ called :file:`Documentation` with a :file:`Documentation/Index.rst` and
a :file:`Documentation/guides.xml` or a :file:`README.rst` / :file:`README.md`
in the extension's root directory.

The extension has to be publicly available on GitHub or GitLab. You have to
The extension has to be publicly available on one of the
:ref:`supported repository hosts <webhook>`. You have to
establish a :ref:`Webhook <webhook>` and the Documentation Team has to
:ref:`approve <approval-intercept>` your first rendering.

Expand Down
3 changes: 2 additions & 1 deletion Documentation/Howto/WritingDocForExtension/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ TER (https://extensions.typo3.org) are two separate, independent entities.

In theory you could have the documentation in GitHub (for example)
and the extension (code) somewhere else (or not in Git at all). You just
need to fire the webhook from GitHub/GitLab/Bitbucket to trigger the
need to fire the webhook from one of the
:ref:`supported repository hosts <webhook>` to trigger the
documentation rendering.


Expand Down
3 changes: 2 additions & 1 deletion Documentation/Howto/WritingDocForExtension/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ the chapter yourself.
Make changes and try :ref:`rendering <rendering-docs>` the new documentation.

To publish your documentation to https://docs.typo3.org
a :ref:`webhook needs to be added <webhook>` on GitHub, Bitbucket or GitLab.
a :ref:`webhook needs to be added <webhook>` on GitHub, Bitbucket, GitLab,
Forgejo or Gitea.
A member of the Documentation Team has to approve your new documentation guide
for publishing. In case the Team has questions, please follow the thread
generated for your extension in the `TYPO3 slack organization <https://typo3.org/community/meet/chat-slack>`_
Expand Down
54 changes: 51 additions & 3 deletions Documentation/Howto/WritingDocForExtension/Webhook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and integrates with the following repository hosts:
* :ref:`webhook-github`
* :ref:`webhook-bitbucket-cloud` and Bitbucket self-hosted
* :ref:`GitLab Cloud <webhook-gitlab>` and :ref:`GitLab self-hosted <webhook-gitlab>`
* :ref:`Forgejo and Gitea <webhook-forgejo>`, including self-hosted instances

.. contents:: Table of Contents
:local:
Expand Down Expand Up @@ -48,9 +49,13 @@ Foreign setups
==============

If your repository is hosted outside the supported platforms
(GitHub, GitLab, Bitbucket) or its structure differs from a typical TYPO3
extension, you must create a mirror on a supported platform. Otherwise,
automatic rendering will not be possible.
(GitHub, GitLab, Bitbucket, Forgejo, Gitea) or its structure differs from a
typical TYPO3 extension, you must create a mirror on a supported platform.
Otherwise, automatic rendering will not be possible.

Self-hosted instances are supported on any domain. The Documentation Team
approves the domain of your instance once, together with the repository
approval described above.

.. _webhook-how-webhook-works:

Expand Down Expand Up @@ -229,6 +234,49 @@ To set up a GitLab webhook:
.. figure:: /_Images/webhook/gitlab/intercept-feedback.png
:width: 932

.. index:: Webhooks; Forgejo
.. _webhook-forgejo:

Forgejo and Gitea
=================

Forgejo and Gitea are supported on any domain, so a self-hosted instance
needs no mirror. To set up the webhook:

.. rst-class:: bignums-xxl

#. Open the repository **Settings** and go to the **Webhooks** section.

#. Click **Add Webhook** and choose **Forgejo** (**Gitea** on a Gitea
instance).

#. Configure the webhook:

* **Target URL**: `https://docs-hook.typo3.org`
* **HTTP Method**: `POST`
* **POST Content Type**: `application/json`
* **Trigger On**: `Custom Events`, with **Push** selected

Leave the branch filter at its default so that tags are delivered as
well. Select push events only. Other events, such as branch creation
or deletion, are rejected by the endpoint and clutter the delivery
history of your webhook.

Click **Add Webhook**.

#. Test the webhook.

Push a commit that changes `README.rst`, `README.md` or a file below
:file:`Documentation/` to `main` or `documentation-draft`. Then visit
`intercept.typo3.com <https://intercept.typo3.com/admin/docs/deployments>`_
and check the **Recent actions** section.

.. note::
The **Test Delivery** button of Forgejo sends a push event that
contains no changed files. The delivery is reported as successful,
but no documentation is rendered by it. Only a real push with
documentation changes triggers the rendering.

.. _webhook-testing:

Testing Webhooks
Expand Down