github-action
github-action is a TypeScript-based GitHub Action that runs Doc Detective in GitHub workflows. Doc Detective can run in any CI/CD environment, but this GitHub Action simplifies running it in GitHub workflows. It also provides a results output, a JSON string you pass through fromJSON() to read in later steps. It offers handy features too, like creating GitHub issues for failed tests.
This repo depends on doc-detective for performing the tests.
Issue notifications
The GitHub Action can automatically create GitHub issues when tests fail. Set create_issue_on_fail to true to enable this.
Basic issue configuration
create_issue_on_fail: Creates a GitHub issue when any test fails.issue_title: Title of the created issue. Default:"Doc Detective Failure".issue_body: Body of the issue. Supports these variables:$RUN_URL: URL of the workflow run that created the issue.$RESULTS: Test results as a JSON code block.$PROMPT: The prompt text (see below).
issue_labels: Comma-separated list of labels to apply.issue_assignees: Comma-separated list of GitHub usernames to assign.
AI integrations
Notify AI-powered integrations when issues are created to help investigate and fix failures faster. Use integrations to specify which integrations to notify.
-
integrations: Comma-separated list of integrations to notify. Supported values:doc-sentinel: Mentions @reem-sabpromptless: Mentions @Promptless with the promptdosu: Mentions @dosu with the promptclaude: Mentions @claude with the promptcursor: Mentions @cursor with the promptopencode: Uses the/opencodecommand with the promptcopilot: Auto-assigns the issue to Copilot (instead of adding to the accordion)
Integrations (except
copilot) appear in a collapsible “Integrations” section in the issue body. Invalid integration names are warned and ignored. -
prompt: Text passed to integrations, inserted where$PROMPTappears in integration mentions. You can also use$PROMPTin your customissue_bodytemplate. Default:"Investigate potential causes of the failures reported in this Doc Detective test output and suggest fixes.".