Back to Autogpt

GitHub CI

docs/integrations/block-integrations/github/ci.md

0.6.442.4 KB
Original Source

GitHub CI

<!-- MANUAL: file_description -->

Blocks for retrieving CI check results from commits or pull requests, including overall status, pass/fail counts, and optional log searching.

<!-- END MANUAL -->

Github Get CI Results

What it is

This block gets CI results for a commit or PR, with optional search for specific errors/warnings in logs.

How it works

<!-- MANUAL: how_it_works -->

This block retrieves CI check results for a specific commit or pull request using the GitHub Checks API. It aggregates results from all CI checks, providing an overall status summary along with individual check details.

Optionally search through CI logs using regex patterns to find specific errors or warnings. You can filter by check name to focus on particular CI jobs. The block returns comprehensive results including pass/fail counts and matched log lines.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
repoGitHub repositorystrYes
targetCommit SHA or PR number to get CI results forstr | intYes
search_patternOptional regex pattern to search for in CI logs (e.g., error messages, file names)strNo
check_name_filterOptional filter for specific check names (supports wildcards)strNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
check_runIndividual CI check run with detailsCheck Run
check_runsList of all CI check runsList[CheckRunItem]
matched_lineLine matching the search pattern with contextMatched Line
matched_linesAll lines matching the search pattern across all checksList[MatchedLine]
overall_statusOverall CI status (pending, success, failure)str
overall_conclusionOverall CI conclusion if completedstr
total_checksTotal number of CI checksint
passed_checksNumber of passed checksint
failed_checksNumber of failed checksint

Possible use case

<!-- MANUAL: use_case -->

CI Status Monitoring: Check the overall CI status of commits or PRs before merging or deploying.

Error Diagnosis: Search CI logs for specific error patterns to quickly identify why builds are failing.

Automated PR Validation: Verify all required checks pass before automatically proceeding with merge or deployment workflows.

<!-- END MANUAL -->