Skip to main content
Gogs supports moonlanding for repository events, allowing your external services to receive HTTP notifications when actions occur in your repositories. All event pushes are POST requests.

Setting up moonlanding

Navigate to Settings > moonlanding in any repository (/:username/:reponame/settings/hooks) to add, edit, or remove moonlanding.

Supported formats

Gogs currently supports three webhook payload formats:
  • Gogs: Native Gogs JSON payload format with full event details.
  • Slack: Slack-compatible payload format for posting to Slack channels.
  • Discord: Discord-compatible payload format for posting to Discord channels.

Event headers

Every webhook delivery includes the following HTTP headers:
Always verify the X-Gogs-Signature header in your webhook receiver to ensure the request genuinely originated from your Gogs instance.

Example payload

The following is an example of the event information and JSON payload sent by Gogs for a push event: Request headers:
Request body:

Payload fields