Skip to content

Commit f72d1ef

Browse files
authored
Merge pull request #2 from doc-detective/promptless/github-action-integrations-and-prompt-inputs
docs: Document GitHub Action issue notifications and AI integrations
2 parents 195cc1d + b8abf9c commit f72d1ef

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

fern/pages/contribute/repos/github-action.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,45 @@ title: github-action
55
[`github-action`](https://github.com/doc-detective/github-action) runs Doc Detective in GitHub workflows. While Doc Detective can run in any CI/CD environment, this GitHub Action simplifies the process of running Doc Detective in GitHub workflows, provides a `results` object that can be used in subsequent steps, and offers handy features like creating GitHub issues for failed tests.
66

77
This repo depends on [`doc-detective`](doc-detective) for performing the tests.
8+
9+
## Issue notifications
10+
11+
The GitHub Action can automatically create GitHub issues when tests fail. Set `create_issue_on_fail` to `true` to enable this.
12+
13+
### Basic issue configuration
14+
15+
- `create_issue_on_fail`: Creates a GitHub issue when any test fails.
16+
- `issue_title`: Title of the created issue. Default: `"Doc Detective Failure"`.
17+
- `issue_body`: Body of the issue. Supports these variables:
18+
- `$RUN_URL`: URL of the workflow run that created the issue.
19+
- `$RESULTS`: Test results as a JSON code block.
20+
- `$PROMPT`: The prompt text (see below).
21+
- `issue_labels`: Comma-separated list of labels to apply.
22+
- `issue_assignees`: Comma-separated list of GitHub usernames to assign.
23+
24+
### AI integrations
25+
26+
Notify AI-powered integrations when issues are created to help investigate and fix failures faster. Use `integrations` to specify which integrations to notify.
27+
28+
- `integrations`: Comma-separated list of integrations to notify. Supported values:
29+
- `doc-sentinel`: Mentions @reem-sab
30+
- `promptless`: Mentions @Promptless with the prompt
31+
- `dosu`: Mentions @dosu with the prompt
32+
- `claude`: Mentions @claude with the prompt
33+
- `opencode`: Uses the `/opencode` command with the prompt
34+
- `copilot`: Auto-assigns the issue to Copilot (instead of adding to the accordion)
35+
36+
Integrations (except `copilot`) appear in a collapsible "Integrations" section in the issue body. Invalid integration names are warned and ignored.
37+
38+
- `prompt`: Text passed to integrations, inserted where `$PROMPT` appears in integration mentions. You can also use `$PROMPT` in your custom `issue_body` template. Default: `"Investigate potential causes of the failures reported in this Doc Detective test output and suggest fixes."`.
39+
40+
### Example
41+
42+
```yaml
43+
- uses: doc-detective/github-action@v1
44+
with:
45+
input: ./docs
46+
create_issue_on_fail: true
47+
integrations: claude,copilot
48+
prompt: "Analyze these test failures and suggest documentation fixes"
49+
```

0 commit comments

Comments
 (0)