Skip to main content

Check that a workflow file supports Docwize run tracking.

POST/api/v1/github-repositories/{github_repository_id}/check-workflow-fileconnectors:read

Reads the workflow file from the repository with its GitHub App installation and reports whether it declares workflow_dispatch, a docwize_run_id input, and echoes that input in run-name: the three things a GitHub step that waits for its run needs. Advisory: the step still dispatches without them. A workflow named by number cannot be read (file_found false). Changes nothing. Needs View Github Repositories.

Scopeconnectors:read (sensitive)
AsynchronousNo
MCP toolcheck_github_repository_workflow_file
Portal permissionsview_github_repositories

Parameters​

NameInTypeRequiredDescription
github_repository_idpathstringRequired
Docwize-Versionheaderstring (date)Optional

Request body​

Content typeType
application/jsonGitHubWorkflowFileCheckRequestInput

Responses​

StatusDescriptionBody
200Success.application/json GitHubWorkflowFileCheck
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

GitHubWorkflowFileCheck​

FieldTypeRequiredDescription
declares_docwize_run_id_inputbooleanRequiredThe file declares a docwize_run_id input (GitHub refuses an undeclared input).
echoes_docwize_run_id_in_run_namebooleanRequiredThe file's run-name echoes docwize_run_id, which is how a run is matched back to its step.
file_foundbooleanRequiredThe file exists at the ref. False for a workflow named by number, which has no path to read.
has_workflow_dispatchbooleanRequiredThe file declares the workflow_dispatch trigger.
messagestring or nullRequiredWhy the file could not be read or understood; null when it was read.
supports_run_trackingbooleanRequiredAll three prerequisites hold, so a step that waits for the run can match it.

GitHubWorkflowFileCheckRequestInput​

FieldTypeRequiredDescription
refstring or nullOptionalThe branch, tag or commit to read the file at; the repository's default branch when left out.
workflow_filestringRequiredThe workflow file: a file name (ci.yml, looked for under .github/workflows) or a path in the repository.