arazzo: 1.0.1
info:
title: Gitea Create Repository With Webhook
summary: Create a repository for the authenticated user and register a webhook.
description: >-
Bootstraps a repository wired for automation on Gitea. The workflow creates
a repository for the authenticated user and immediately registers a
gitea-type webhook so downstream systems receive events from the first
commit onward. 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
x-realizes-capability-ids:
- BC-4200.40
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-4200.40
capability_name: Software Construction Management
spec: gitea-repository-api-openapi.yml
confidence: 0.85
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: repositoryApi
url: ../openapi/gitea-repository-api-openapi.yml
type: openapi
workflows:
- workflowId: repo-with-webhook
summary: Create a repo and register a webhook on it.
description: >-
Creates a repository for the authenticated user, then registers a
gitea-type webhook on it for push and pull request events.
inputs:
type: object
required:
- authToken
- owner
- repoName
- webhookUrl
properties:
authToken:
type: string
description: Authorization header value, e.g. "token <personal-access-token>".
owner:
type: string
description: Username that owns the new repository (the authenticated user).
repoName:
type: string
description: Name of the repository to create.
repoDescription:
type: string
description: Description of the repository.
webhookUrl:
type: string
description: Target URL the webhook delivers payloads to.
webhookSecret:
type: string
description: Optional shared secret used to sign webhook payloads.
steps:
- stepId: createRepo
description: Create a repository for the authenticated user.
operationId: createCurrentUserRepo
parameters:
- name: Authorization
in: header
value: $inputs.authToken
requestBody:
contentType: application/json
payload:
name: $inputs.repoName
description: $inputs.repoDescription
auto_init: true
private: false
successCriteria:
- condition: $statusCode == 201
outputs:
repoId: $response.body#/id
repoFullName: $response.body#/full_name
- stepId: createWebhook
description: Register a gitea-type webhook on the new repository.
operationId: repoCreateHook
parameters:
- name: Authorization
in: header
value: $inputs.authToken
- name: owner
in: path
value: $inputs.owner
- name: repo
in: path
value: $inputs.repoName
requestBody:
contentType: application/json
payload:
type: gitea
active: true
events:
- push
- pull_request
config:
url: $inputs.webhookUrl
content_type: json
secret: $inputs.webhookSecret
successCriteria:
- condition: $statusCode == 201
outputs:
hookId: $response.body#/id
hookType: $response.body#/type
outputs:
repoId: $steps.createRepo.outputs.repoId
repoFullName: $steps.createRepo.outputs.repoFullName
hookId: $steps.createWebhook.outputs.hookId
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.