Gitea · Arazzo Workflow

Gitea Sprint Issue Setup

Version 1.0.0

Create a milestone and label, open an issue under them, and apply the label.

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

Provider

gitea

Workflows

sprint-issue-setup
Create a milestone and label, open an issue, and apply the label.
Creates a milestone, creates a label, opens an issue attached to the milestone, then applies the label to the issue.
4 steps inputs: authToken, issueBody, issueTitle, labelColor, labelName, milestoneTitle, owner, repo outputs: issueNumber, issueUrl, labelId, milestoneId
1
createMilestone
issueCreateMilestone
Create the sprint milestone.
2
createLabel
issueCreateLabel
Create the triage label.
3
createIssue
issueCreateIssue
Open an issue attached to the sprint milestone.
4
applyLabel
issueAddLabel
Apply the triage label to the new issue.

Source API Descriptions

Arazzo Workflow Specification

gitea-sprint-issue-setup-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Gitea Sprint Issue Setup
  summary: Create a milestone and label, open an issue under them, and apply the label.
  description: >-
    Sets up a fully classified work item on Gitea in one pass. The workflow
    creates a sprint milestone, creates a triage label, opens an issue attached
    to the milestone, and then applies the new label to that issue. 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: sprint-issue-setup
  summary: Create a milestone and label, open an issue, and apply the label.
  description: >-
    Creates a milestone, creates a label, opens an issue attached to the
    milestone, then applies the label to the issue.
  inputs:
    type: object
    required:
    - authToken
    - owner
    - repo
    - milestoneTitle
    - labelName
    - labelColor
    - issueTitle
    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.
      milestoneTitle:
        type: string
        description: Title of the sprint milestone.
      labelName:
        type: string
        description: Name of the triage label.
      labelColor:
        type: string
        description: Hex color for the label, e.g. "#00aabb".
      issueTitle:
        type: string
        description: Title of the issue to open.
      issueBody:
        type: string
        description: Body text for the issue.
  steps:
  - stepId: createMilestone
    description: Create the sprint milestone.
    operationId: issueCreateMilestone
    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:
        title: $inputs.milestoneTitle
        state: open
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      milestoneId: $response.body#/id
  - stepId: createLabel
    description: Create the triage label.
    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
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      labelId: $response.body#/id
  - stepId: createIssue
    description: Open an issue attached to the sprint milestone.
    operationId: issueCreateIssue
    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:
        title: $inputs.issueTitle
        body: $inputs.issueBody
        milestone: $steps.createMilestone.outputs.milestoneId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      issueNumber: $response.body#/number
      issueUrl: $response.body#/html_url
  - stepId: applyLabel
    description: Apply the triage label to the new 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: $steps.createIssue.outputs.issueNumber
    requestBody:
      contentType: application/json
      payload:
        labels:
        - $steps.createLabel.outputs.labelId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      appliedLabels: $response.body
  outputs:
    milestoneId: $steps.createMilestone.outputs.milestoneId
    labelId: $steps.createLabel.outputs.labelId
    issueNumber: $steps.createIssue.outputs.issueNumber
    issueUrl: $steps.createIssue.outputs.issueUrl