@@ -17,48 +17,9 @@ AI-powered GitHub Issue assistant that provides intelligent responses based on r
1717- 🧠 Multiple AI model support (OpenAI, Claude)
1818- 📋 Customizable response templates
1919
20- ## Requirements
20+ ## Quick Start
2121
22- - Go 1.23 or higher
23- - GitHub Personal Access Token (PAT) with ` repo ` scope
24- - AI API Key (OpenAI or Anthropic)
25- - Docker (optional, for containerized running)
26-
27- ## Environment Variables
28-
29- | Variable | Description | Required | Default |
30- | ----------| -------------| ----------| ---------|
31- | ` GITHUB_TOKEN ` | GitHub PAT with repo scope | Yes | - |
32- | ` OPENAI_API_KEY ` | OpenAI API Key | Yes* | - |
33- | ` CLAUDE_API_KEY ` | Anthropic Claude API Key | Yes* | - |
34- | ` AI_TYPE ` | AI model type (openai/claude) | Yes | - |
35-
36- * Either OPENAI_API_KEY or CLAUDE_API_KEY is required based on AI_TYPE
37-
38- ## Project Structure
39-
40- ```
41- .
42- ├── cmd/
43- │ └── issue-assistant/
44- ├── internal/
45- │ └── helper/
46- ├── pkg/
47- │ ├── ai/
48- │ ├── github/
49- │ └── logger/
50- └── .github/
51- └── workflows/
52- ```
53-
54- ## Setup
55-
56- 1 . Create required secrets in your repository:
57- - ` GITHUB_TOKEN ` : GitHub token with repo scope (automatically provided by GitHub Actions)
58- - ` OPENAI_API_KEY ` : Your OpenAI API key (if using OpenAI)
59- - ` CLAUDE_API_KEY ` : Your Claude API key (if using Claude)
60-
61- 2 . Add the following workflow file to your repository (` .github/workflows/issue-assistant.yml ` ):
22+ 1 . Add this workflow to your repository (` .github/workflows/issue-assistant.yml ` ):
6223
6324``` yaml
6425name : Issue Assistant
@@ -73,56 +34,71 @@ jobs:
7334 issues : write
7435 contents : read
7536 steps :
76- - uses : actions/checkout@v3
37+ - uses : workflowkit/issue-assistant@v1
7738 with :
78- repository : workflowkit/issue-assistant
79- token : ${{ secrets.GITHUB_TOKEN }}
80- path : .issue-assistant
81-
82- - name : Build and run assistant
83- working-directory : .issue-assistant
84- env :
85- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86- AI_TYPE : " openai" # or "claude"
87- OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
88- CLAUDE_API_KEY : ${{ secrets.CLAUDE_API_KEY }}
89- run : |
90- docker build -t issue-assistant .
91- docker run --rm \
92- -e GITHUB_TOKEN \
93- -e AI_TYPE \
94- -e OPENAI_API_KEY \
95- -e CLAUDE_API_KEY \
96- -e GITHUB_EVENT_PATH \
97- -v $GITHUB_EVENT_PATH:$GITHUB_EVENT_PATH \
98- issue-assistant
39+ github_token : ${{ secrets.GITHUB_TOKEN }}
40+ ai_type : " openai" # or "claude"
41+ openai_api_key : ${{ secrets.OPENAI_API_KEY }}
42+ # claude_api_key: ${{ secrets.CLAUDE_API_KEY }} # if using claude
43+ enable_comment : " true" # required: at least one feature must be enabled
44+ enable_label : " false" # required: at least one feature must be enabled
9945` ` `
10046
101- ## How It Works
47+ 2. Add required secrets to your repository:
48+ - ` OPENAI_API_KEY` (if using OpenAI)
49+ - ` CLAUDE_API_KEY` (if using Claude)
10250
103- 1. When a new issue is opened, the workflow is triggered
104- 2. The assistant reads the repository content
105- 3. OpenAI GPT-4 analyzes the issue and repository content
106- 4. A detailed response is posted as a comment on the issue
107- 5. Confidence scoring ensures high-quality responses
51+ That's it! Now when someone opens an issue :
52+ - AI will analyze the issue content
53+ - AI will analyze your repository code
54+ - AI will post a helpful response as a comment
55+ - Optionally, AI can suggest labels
10856
109- ## Development
57+ # # Configuration Options
11058
111- ` ` ` bash
112- # Clone the repository
113- git clone https://github.com/workflowkit/issue-assistant.git
59+ | Option | Description | Required | Default |
60+ |--------|-------------|----------|---------|
61+ | `github_token` | GitHub token (automatically provided) | Yes | - |
62+ | `ai_type` | AI model to use (`openai` or `claude`) | Yes | - |
63+ | `openai_api_key` | OpenAI API Key | Yes* | - |
64+ | `claude_api_key` | Claude API Key | Yes* | - |
65+ | `enable_comment` | Enable AI comments on issues | Yes** | false |
66+ | `enable_label` | Enable AI label suggestions | Yes** | false |
11467
115- # Install dependencies
116- go mod tidy
68+ *Either `openai_api_key` or `claude_api_key` is required based on `ai_type`
69+ **At least one feature (`enable_comment` or `enable_label`) must be enabled
11770
118- # Run tests
119- go test ./...
71+ # # Advanced Usage
72+
73+ # ## Using with OpenAI:
74+ ` ` ` yaml
75+ - uses: workflowkit/issue-assistant@v1
76+ with:
77+ github_token: ${{ secrets.GITHUB_TOKEN }}
78+ ai_type: "openai"
79+ openai_api_key: ${{ secrets.OPENAI_API_KEY }}
80+ enable_comment: "true"
81+ ` ` `
12082
121- # Build locally
122- go build -o bin/issue-assistant
83+ # ## Using with Claude:
84+ ` ` ` yaml
85+ - uses: workflowkit/issue-assistant@v1
86+ with:
87+ github_token: ${{ secrets.GITHUB_TOKEN }}
88+ ai_type: "claude"
89+ claude_api_key: ${{ secrets.CLAUDE_API_KEY }}
90+ enable_label: "true"
91+ ` ` `
12392
124- # Build Docker image
125- docker build -t issue-assistant .
93+ # ## Enable All Features:
94+ ` ` ` yaml
95+ - uses: workflowkit/issue-assistant@v1
96+ with:
97+ github_token: ${{ secrets.GITHUB_TOKEN }}
98+ ai_type: "openai"
99+ openai_api_key: ${{ secrets.OPENAI_API_KEY }}
100+ enable_comment: "true"
101+ enable_label: "true"
126102` ` `
127103
128104# # Contributing
0 commit comments