arazzo: 1.0.1
info:
title: Gitea Create Label And Apply To Issue
summary: Create a repository label and apply it to an existing issue.
description: >-
Sets up issue triage on Gitea. The workflow creates a new label in a
repository and then applies that label to an existing issue by its id. 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
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
capability_name: Software Product Engineering Management
spec: gitea-issue-api-openapi.yml
confidence: 0.75
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: issueApi
url: ../openapi/gitea-issue-api-openapi.yml
type: openapi
workflows:
- workflowId: label-create-and-apply
summary: Create a label and apply it to an issue.
description: >-
Creates a repository label, then applies it to the target issue by label id.
inputs:
type: object
required:
- authToken
- owner
- repo
- issueIndex
- labelName
- labelColor
properties:
authToken:
type: string
description: Authorization header value, e.g. "token <personal-access-token>".
owner:
type: string
description: Owner of the repository.
repo:
type: string
description: Name of the repository.
issueIndex:
type: integer
description: Index (number) of the issue to label.
labelName:
type: string
description: Name of the label to create.
labelColor:
type: string
description: Hex color for the label, e.g. "#00aabb".
labelDescription:
type: string
description: Optional description of the label's purpose.
steps:
- stepId: createLabel
description: Create a new label in the repository.
operationId: issueCreateLabel
parameters:
- name: Authorization
in: header
value: $inputs.authToken
- name: owner
in: path
value: $inputs.owner
- name: repo
in: path
value: $inputs.repo
requestBody:
contentType: application/json
payload:
name: $inputs.labelName
color: $inputs.labelColor
description: $inputs.labelDescription
successCriteria:
- condition: $statusCode == 201
outputs:
labelId: $response.body#/id
labelUrl: $response.body#/url
- stepId: applyLabel
description: Apply the newly created label to the target issue.
operationId: issueAddLabel
parameters:
- name: Authorization
in: header
value: $inputs.authToken
- name: owner
in: path
value: $inputs.owner
- name: repo
in: path
value: $inputs.repo
- name: index
in: path
value: $inputs.issueIndex
requestBody:
contentType: application/json
payload:
labels:
- $steps.createLabel.outputs.labelId
successCriteria:
- condition: $statusCode == 200
outputs:
appliedLabels: $response.body
outputs:
labelId: $steps.createLabel.outputs.labelId
appliedLabels: $steps.applyLabel.outputs.appliedLabels
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.