-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
52 lines (48 loc) · 1.6 KB
/
action.yml
File metadata and controls
52 lines (48 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: docNerd
description: Generate documentation PRs from source PR comments using Claude
branding:
icon: file-text
color: blue
inputs:
target-owner:
description: Docs repository owner (e.g. your-org)
required: true
target-name:
description: Docs repository name (e.g. your-docs-repo)
required: true
github-token:
description: Token for GitHub API (pass secrets.GITHUB_TOKEN)
required: true
target-repo-token:
description: Token for docs repo (if different from github-token)
required: false
anthropic-api-key:
description: Anthropic API key for Claude
required: true
bot-token:
description: PAT from a "docNerd" GitHub account so comments appear as docNerd instead of github-actions
required: false
runs:
using: composite
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install docNerd
run: pip install -e ${{ github.action_path }}
shell: bash
- name: Run docNerd
shell: bash
env:
COMMENT_BODY: ${{ github.event.comment.body }}
PR_NUMBER: ${{ github.event.issue.number }}
SOURCE_OWNER: ${{ github.repository_owner }}
SOURCE_NAME: ${{ github.event.repository.name }}
TARGET_REPO_OWNER: ${{ inputs.target-owner }}
TARGET_REPO_NAME: ${{ inputs.target-name }}
GITHUB_TOKEN: ${{ inputs.github-token }}
TARGET_REPO_TOKEN: ${{ inputs.target-repo-token }}
DOCNERD_BOT_TOKEN: ${{ inputs.bot-token }}
ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key }}
run: python -m docnerd.main