Gitea · Arazzo Workflow

Gitea Create Organization With Webhook

Version 1.0.0

Create an organization and register an organization-level webhook.

1 workflow 1 source API 1 provider
View Spec View on GitHub GitSource ControlDevOpsCI/CDCode HostingOpen SourceSelf HostedPackage RegistryIssue TrackingPull RequestsArazzoWorkflows

Provider

gitea

Workflows

org-with-webhook
Create an org and register an org-level webhook.
Creates an organization, then registers a gitea-type webhook at the organization level for push and repository events.
2 steps inputs: authToken, orgFullName, orgUsername, webhookUrl outputs: hookId, orgId
1
createOrg
orgCreate
Create a new organization.
2
createOrgWebhook
orgCreateHook
Register a gitea-type webhook at the organization level.

Source API Descriptions

Arazzo Workflow Specification

gitea-org-with-webhook-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Gitea Create Organization With Webhook
  summary: Create an organization and register an organization-level webhook.
  description: >-
    Stands up an organization wired for event delivery on Gitea. The workflow
    creates an organization and registers an organization-level webhook so all
    of the org's repositories deliver events to a single endpoint. Each step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: giteaApi
  url: ../openapi/gitea-rest-api-openapi.yml
  type: openapi
workflows:
- workflowId: org-with-webhook
  summary: Create an org and register an org-level webhook.
  description: >-
    Creates an organization, then registers a gitea-type webhook at the
    organization level for push and repository events.
  inputs:
    type: object
    required:
    - authToken
    - orgUsername
    - webhookUrl
    properties:
      authToken:
        type: string
        description: Authorization header value, e.g. "token <personal-access-token>".
      orgUsername:
        type: string
        description: Username (slug) of the organization to create.
      orgFullName:
        type: string
        description: Display name of the organization.
      webhookUrl:
        type: string
        description: Target URL the webhook delivers payloads to.
  steps:
  - stepId: createOrg
    description: Create a new organization.
    operationId: orgCreate
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authToken
    requestBody:
      contentType: application/json
      payload:
        username: $inputs.orgUsername
        full_name: $inputs.orgFullName
        visibility: public
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      orgId: $response.body#/id
      orgName: $response.body#/username
  - stepId: createOrgWebhook
    description: Register a gitea-type webhook at the organization level.
    operationId: orgCreateHook
    parameters:
    - name: Authorization
      in: header
      value: $inputs.authToken
    - name: org
      in: path
      value: $inputs.orgUsername
    requestBody:
      contentType: application/json
      payload:
        type: gitea
        active: true
        events:
        - push
        - repository
        config:
          url: $inputs.webhookUrl
          content_type: json
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      hookId: $response.body#/id
  outputs:
    orgId: $steps.createOrg.outputs.orgId
    hookId: $steps.createOrgWebhook.outputs.hookId