get_pipeline_step_logs
Why did an Ankra Pipelines step fail? Reads a pipeline run and one step's archived log tail. Address the run by execution_id (each agent-run pipeline step is its own execution in list_recent_executions), run_id (a UUID), or owner and repo: run_number (run #3630), else the newest run narrowed by branch, pull_request or head_sha (recent_runs lists ten). Find a pull request's run by pull_request, not branch (refs/pull/622/merge reads as pull_request 622). The step read is step (key or display name), else the execution's, else the first failing one. Returns the run (repository, ref, sha, outcome, cluster), each step's outcome and exit code, and log.state: available (text = last max_lines lines), not_archived, or unavailable (unknown, not empty). Read-only; needs pipelines.read. Ankra Pipelines runs are not GitHub Actions runs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Repository name, with owner. | |
| step | No | Step key or display name whose log to read. Defaults to the execution's step, else the run's first failing step. | |
| owner | No | Repository owner, with repo; repo may also be owner/name. | |
| branch | No | With owner/repo: only runs of this branch (a pull request run's is its base). | |
| run_id | No | A run's UUID (a run number is read as run_number). | |
| head_sha | No | With owner/repo: only runs of this full commit SHA. | |
| provider | No | Source control provider of owner/repo: github, gitlab, or bitbucket_cloud. Defaults to github. | |
| max_lines | No | Trailing log lines to return, 1-400; default 150. | |
| run_number | No | With owner/repo: the number shown as run #3630. | |
| execution_id | No | An execution id from list_recent_executions or get_execution_details. | |
| pull_request | No | With owner/repo: only this pull request's runs. |