doc-detective/Doc Detective

Treat doc content as testable assertions to validate doc accuracy and product UX.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
namedescriptionrequireddefault
versionSpecify the version of Doc Detective to use. This can be a specific version number or an NPM tag (like `latest`). Set to an empty string ("") to run whatever `doc-detective` is already resolvable in the working directory (e.g. a locally-built checkout exposed via `npm link`) instead of installing from the registry — useful for a repo dog-fooding this action against its own build.nolatest
working_directoryThe directory to run the command in, relative to the root of the repository. Defaults to the root of the repository.no.
androidEnable Android emulator support on Linux runners by granting KVM access (the emulator needs hardware acceleration). "auto" (default) scans your specs and only sets up KVM when an android platform is present; "true" always sets it up; "false" never does. No effect on macOS/Windows runners, which can't accelerate the emulator. Doc Detective bootstraps the SDK, emulator, system image, AVD, and driver itself at test time.noauto
iosDEPRECATED — no-op. Doc Detective (v4.28+) prebuilds and manages the WebDriverAgent build itself, keyed by Xcode and XCUITest driver versions. For fast iOS runs, execute `npx doc-detective install ios --yes` with a persisted cache directory (DOC_DETECTIVE_CACHE_DIR + actions/cache) before this action: https://doc-detective.com/docs/ci/github-action#speed-up-ios-tests-on-macos. iOS tests still work without it — the first session builds WebDriverAgent in-session when no prebuilt products exist.noauto
configPath to the configuration file.no
inputPath to the input file or directory. Overrides the "input" field in the config file.no
create_pr_on_changeCreate a pull request if any files in the repo change, such as if screenshots or command results get updated. Default is "false". Only valid for the "runTests" command.nofalse
pr_branchThe name of the branch to create for the pull request. Defaults to `doc-detective-{DATE}`. Only valid if "create_pr_on_change" is set to "true".no
pr_titleThe title of the created pull request. Only valid if "create_pr_on_change" is set to "true".noDoc Detective Changes
pr_bodyThe body of the created pull request. `$RUN_URL` inserts the URL of the workflow run that created the pull request. Only valid if "create_pr_on_change" is set to "true".noA Doc Detective run ($RUN_URL) updated files. DISCLAIMER: This pull request doesn't reflect whether Doc Detective tests passed for failed, only that files in the repository changed. Review the changes to make sure they're accurate.
pr_labelsComma-separated list of labels to apply to the pull request. Only valid if "create_pr_on_change" is set to "true".nodoc-detective
pr_assigneesComma-separated list of GitHub usernames to assign to the pull request. Only valid if "create_pr_on_change" is set to "true".no""
pr_reviewersComma-separated list of GitHub usernames to request reviews from for the pull request. Only valid if "create_pr_on_change" is set to "true".no""
exit_on_failExit with a non-zero code if one or more tests fails. Default is "false". Only valid for the "runTests" command.nofalse
create_issue_on_failCreate a GitHub issue if one or more tests fails. Default is "false". Only valid for the "runTests" command.nofalse
issue_titleThe title of the created GitHub issue. Only valid if "create_issue_on_fail" is set to "true".noDoc Detective Failure
issue_bodyThe body of the created GitHub issue. `$RESULTS` inserts the results object. `$RUN_URL` inserts the URL of the workflow that created the issue. `$PROMPT` inserts the prompt text. Only valid if "create_issue_on_fail" is set to "true".noA Doc Detective run ($RUN_URL) failed with the following results:$RESULTS
issue_labelsComma-separated list of labels to apply to the GitHub issue. Only valid if "create_issue_on_fail" is set to "true".nodoc-detective
issue_assigneesComma-separated list of GitHub usernames to assign to the GitHub issue. Only valid if "create_issue_on_fail" is set to "true".no""
integrationsComma-separated list of integrations to notify in the created GitHub issue. When specified, matching integrations are triggered via mentions or commands in a collapsible "Integrations" section appended to the issue body. Supported values: "doc-sentinel", "promptless", "dosu", "claude", "opencode", "copilot", "cursor". Invalid values are ignored with a warning. The "copilot" integration auto-assigns the issue to Copilot instead of adding to the accordion. Only valid if "create_issue_on_fail" is set to "true".no""
promptThe prompt passed to integrations. For example, if `integrations` is set to `claude`, the issue includes "@claude <prompt_value>". Also available as `$PROMPT` in the `issue_body` template. Only valid if "create_issue_on_fail" is set to "true".noInvestigate potential causes of the failures reported in this Doc Detective test output and suggest fixes.
tokenThe GitHub token to use for creating issues. Defaults to the token already available to the GitHub Action workflow. Only set this if you want to override the default token.no${{ github.token }}
namedescription
resultsJSON-formatted results of the command.