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.
| Scope | connectors:read (sensitive) |
| Asynchronous | No |
| MCP tool | check_github_repository_workflow_file |
| Portal permissions | view_github_repositories |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
github_repository_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional |
Request body
| Content type | Type |
|---|---|
application/json | GitHubWorkflowFileCheckRequestInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json GitHubWorkflowFileCheck |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
GitHubWorkflowFileCheck
| Field | Type | Required | Description |
|---|---|---|---|
declares_docwize_run_id_input | boolean | Required | The file declares a docwize_run_id input (GitHub refuses an undeclared input). |
echoes_docwize_run_id_in_run_name | boolean | Required | The file's run-name echoes docwize_run_id, which is how a run is matched back to its step. |
file_found | boolean | Required | The file exists at the ref. False for a workflow named by number, which has no path to read. |
has_workflow_dispatch | boolean | Required | The file declares the workflow_dispatch trigger. |
message | string or null | Required | Why the file could not be read or understood; null when it was read. |
supports_run_tracking | boolean | Required | All three prerequisites hold, so a step that waits for the run can match it. |
GitHubWorkflowFileCheckRequestInput
| Field | Type | Required | Description |
|---|---|---|---|
ref | string or null | Optional | The branch, tag or commit to read the file at; the repository's default branch when left out. |
workflow_file | string | Required | The workflow file: a file name (ci.yml, looked for under .github/workflows) or a path in the repository. |