arazzo: 1.0.1 info: title: Sentry Sync Prevent Repositories summary: Trigger a Prevent repository sync from GitHub, poll until it finishes, then list the synced repositories. description: >- The integration-refresh flow for Sentry Prevent. The workflow triggers a sync of repositories from the integrated organization's GitHub, polls the sync status until it is no longer running, and then lists the synced repositories so the operator can confirm what was pulled in. 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: preventApi url: ../openapi/sentry-prevent-openapi.yml type: openapi workflows: - workflowId: sync-prevent-repos summary: Trigger a Prevent repo sync, poll to completion, and list repositories. description: >- Initiates a Prevent repository sync from GitHub, polls the sync status until it reports completed, and lists the resulting repositories. inputs: type: object required: - organizationIdOrSlug properties: organizationIdOrSlug: type: string description: The ID or slug of the organization with the GitHub integration. steps: - stepId: triggerSync description: >- Trigger a sync of repositories from the integrated organization's GitHub. operationId: syncRepositories parameters: - name: organization_id_or_slug in: path value: $inputs.organizationIdOrSlug successCriteria: - condition: $statusCode == 202 outputs: syncAccepted: $statusCode - stepId: pollSyncStatus description: >- Poll the repository sync status. The step succeeds once the status is no longer running; it loops while a sync is still in progress. operationId: getSyncStatus parameters: - name: organization_id_or_slug in: path value: $inputs.organizationIdOrSlug successCriteria: - condition: $statusCode == 200 outputs: status: $response.body#/status lastSync: $response.body#/lastSync onSuccess: - name: stillSyncing type: goto stepId: pollSyncStatus criteria: - context: $response.body condition: $.status == "syncing" type: jsonpath - name: syncDone type: goto stepId: listRepos criteria: - context: $response.body condition: $.status == "completed" type: jsonpath - stepId: listRepos description: >- List the synced Prevent repositories so the operator can confirm what was pulled in from GitHub. operationId: listRepositories parameters: - name: organization_id_or_slug in: path value: $inputs.organizationIdOrSlug successCriteria: - condition: $statusCode == 200 outputs: firstRepoId: $response.body#/0/id outputs: status: $steps.pollSyncStatus.outputs.status lastSync: $steps.pollSyncStatus.outputs.lastSync firstRepoId: $steps.listRepos.outputs.firstRepoId