GitHub · Arazzo Workflow

GitHub Create Organization Repository and Open First Issue

Version 1.0.0

Create a repository inside an organization and open its first tracking issue.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CodePipelinesPlatformSoftware DevelopmentSource ControlT1ArazzoWorkflows

Provider

github

Workflows

create-org-repository-and-issue
Create an organization repository then open a first issue in it.
Creates a repository owned by an organization and chains the returned owner and repository name into a follow-up call that opens the first issue.
2 steps inputs: description, githubToken, issueBody, issueTitle, name, org, private outputs: issueNumber, issueUrl, repositoryUrl
1
createOrgRepository
createAnOrganizationRepository
Create a new repository owned by the organization, initialized with a README so the default branch is created.
2
openFirstIssue
createAnIssue
Open the first issue in the newly created organization repository using the owner and repository name returned by the create step.

Source API Descriptions

Arazzo Workflow Specification

github-create-org-repository-and-issue-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: GitHub Create Organization Repository and Open First Issue
  summary: Create a repository inside an organization and open its first tracking issue.
  description: >-
    The organization equivalent of bootstrapping a new project. The workflow
    creates a repository owned by a named organization (auto initialized so the
    default branch exists), then opens a first issue in that repository to track
    initial work. Every 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: githubOrganizationsApi
  url: ../openapi/github-organizations-openapi.yml
  type: openapi
- name: githubRepoIssuesApi
  url: ../openapi/github-repo-issues-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-org-repository-and-issue
  summary: Create an organization repository then open a first issue in it.
  description: >-
    Creates a repository owned by an organization and chains the returned owner
    and repository name into a follow-up call that opens the first issue.
  inputs:
    type: object
    required:
    - githubToken
    - org
    - name
    - issueTitle
    properties:
      githubToken:
        type: string
        description: A GitHub token with repo and org scope, passed as a Bearer credential.
      org:
        type: string
        description: The login of the organization that will own the repository.
      name:
        type: string
        description: The name of the repository to create.
      description:
        type: string
        description: A short description of the repository.
      private:
        type: boolean
        description: Whether the repository is private.
      issueTitle:
        type: string
        description: The title of the first issue to open.
      issueBody:
        type: string
        description: The body of the first issue to open.
  steps:
  - stepId: createOrgRepository
    description: >-
      Create a new repository owned by the organization, initialized with a
      README so the default branch is created.
    operationId: createAnOrganizationRepository
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: org
      in: path
      value: $inputs.org
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.name
        description: $inputs.description
        private: $inputs.private
        auto_init: true
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      ownerLogin: $response.body#/owner/login
      repoName: $response.body#/name
      htmlUrl: $response.body#/html_url
  - stepId: openFirstIssue
    description: >-
      Open the first issue in the newly created organization repository using
      the owner and repository name returned by the create step.
    operationId: createAnIssue
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.githubToken
    - name: owner
      in: path
      value: $steps.createOrgRepository.outputs.ownerLogin
    - name: repo
      in: path
      value: $steps.createOrgRepository.outputs.repoName
    requestBody:
      contentType: application/json
      payload:
        title: $inputs.issueTitle
        body: $inputs.issueBody
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      issueNumber: $response.body#/number
      issueUrl: $response.body#/html_url
  outputs:
    repositoryUrl: $steps.createOrgRepository.outputs.htmlUrl
    issueNumber: $steps.openFirstIssue.outputs.issueNumber
    issueUrl: $steps.openFirstIssue.outputs.issueUrl