{"id":28708374,"url":"https://github.com/unit-mesh/autodev-remote-agent-action","last_synced_at":"2025-06-14T18:11:18.866Z","repository":{"id":298036689,"uuid":"998624221","full_name":"unit-mesh/autodev-remote-agent-action","owner":"unit-mesh","description":"🤖 Automated GitHub issue analysis using AI-powered code analysis. This action automatically analyzes GitHub issues when they are created or updated, providing intelligent insights and recommendations.","archived":false,"fork":false,"pushed_at":"2025-06-09T04:17:14.000Z","size":164,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-09T04:19:50.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unit-mesh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-09T01:42:51.000Z","updated_at":"2025-06-09T04:16:45.000Z","dependencies_parsed_at":"2025-06-09T04:30:43.923Z","dependency_job_id":null,"html_url":"https://github.com/unit-mesh/autodev-remote-agent-action","commit_stats":null,"previous_names":["unit-mesh/autodev-remote-agent-action"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/unit-mesh/autodev-remote-agent-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fautodev-remote-agent-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fautodev-remote-agent-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fautodev-remote-agent-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fautodev-remote-agent-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unit-mesh","download_url":"https://codeload.github.com/unit-mesh/autodev-remote-agent-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unit-mesh%2Fautodev-remote-agent-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259860438,"owners_count":22922990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-14T18:11:13.752Z","updated_at":"2025-06-14T18:11:18.848Z","avatar_url":"https://github.com/unit-mesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoDev Remote Agent\n\n🤖 Automated GitHub issue analysis using AI-powered code analysis. This action automatically analyzes GitHub issues when they are created or updated, providing intelligent insights and recommendations.\n\n## Features\n\n- 🔍 **Intelligent Issue Analysis**: AI-powered analysis of GitHub issues with code context\n- 💬 **Automated Comments**: Automatically add analysis results as comments to issues\n- 🏷️ **Smart Labeling**: Automatically apply relevant labels based on analysis\n- 🌐 **Webhook Support**: Standalone webhook server for real-time issue processing\n- ⚙️ **Configurable**: Flexible configuration options for different workflows\n- 🔗 **Integration Ready**: Built on top of the proven AutoDev GitHub Agent\n- 🔍 **Process Transparency**: Detailed analysis process information and file filtering insights\n- 🛠️ **Diagnostic Information**: Clear explanations when analysis results are limited\n- 🍽️ **Dogfooding**: We use our own action to analyze issues in this repository!\n\n## Quick Start\n\n### Prerequisites\n\nBefore using this action, you need:\n1. A GitHub repository\n2. An API key from one of the supported LLM providers (OpenAI, DeepSeek, or GLM)\n\n### Setup Steps\n\n1. **Add API Key Secret**:\n   - Go to your repository's **Settings** → **Secrets and variables** → **Actions**\n   - Click **New repository secret**\n   - Add `DEEPSEEK_TOKEN` (or `OPENAI_API_KEY`/`GLM_TOKEN`) with your API key\n\n2. **Create Workflow File**:\n   - Create `.github/workflows/issue-analysis.yml` in your repository\n\n3. **Configure the Action**:\n   - Use the configuration examples below\n\n### GitHub Actions Usage\n\nAdd this action to your workflow file (e.g., `.github/workflows/issue-analysis.yml`):\n\n```yaml\nname: Analyze Issues\non:\n  issues:\n    types: [opened, edited, reopened]\n\njobs:\n  analyze:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Analyze Issue\n        uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          deepseek-token: ${{ secrets.DEEPSEEK_TOKEN }}  # or use openai-api-key/glm-token\n          analysis-depth: medium\n          auto-comment: true\n          auto-label: true\n```\n\n### Standalone Webhook Server\n\n```bash\n# Install dependencies\nnpm install\n\n# Set environment variables\nexport GITHUB_TOKEN=\"your-github-token\"\nexport WEBHOOK_SECRET=\"your-webhook-secret\"\nexport DEEPSEEK_TOKEN=\"your-deepseek-token\"  # or OPENAI_API_KEY/GLM_TOKEN\n\n# Start the server\nnpx autodev-github-action server --port 3000\n```\n\n### CLI Usage\n\n```bash\n# Analyze a specific issue\nnpx autodev-github-action analyze \\\n  --owner unit-mesh \\\n  --repo autodev-workbench \\\n  --issue 81 \\\n  --depth deep\n\n# Start webhook server\nnpx autodev-github-action server --port 3000\n\n# Validate configuration\nnpx autodev-github-action validate\n```\n\n## Configuration\n\n### Action Inputs\n\n| Input | Description | Default | Required |\n|-------|-------------|---------|----------|\n| `github-token` | GitHub token for API access | `${{ github.token }}` | Yes |\n| `deepseek-token` | DeepSeek API token for LLM analysis | `` | No* |\n| `openai-api-key` | OpenAI API key for LLM analysis | `` | No* |\n| `glm-token` | GLM API token for LLM analysis | `` | No* |\n| `workspace-path` | Path to repository workspace | `${{ github.workspace }}` | No |\n| `analysis-depth` | Analysis depth (shallow/medium/deep) | `medium` | No |\n| `auto-comment` | Add analysis comment to issues | `true` | No |\n| `auto-label` | Add labels based on analysis | `true` | No |\n| `trigger-events` | Events that trigger analysis | `opened,edited,reopened` | No |\n| `exclude-labels` | Labels to exclude from analysis | `` | No |\n| `include-labels` | Labels to include for analysis | `` | No |\n| `include-config-files` | Include configuration files in analysis | `true` | No |\n| `include-test-files` | Include test files in analysis | `true` | No |\n| `include-patterns` | File patterns to force include | `` | No |\n| `exclude-patterns` | File patterns to exclude | `` | No |\n| `force-include-files` | Specific files to always include | `` | No |\n| `webhook-secret` | Secret for webhook verification | `` | No |\n\n*At least one LLM API key is required for AI analysis\n\n### Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `GITHUB_TOKEN` | GitHub personal access token | Required |\n| `DEEPSEEK_TOKEN` | DeepSeek API token for LLM analysis | Optional* |\n| `OPENAI_API_KEY` | OpenAI API key for LLM analysis | Optional* |\n| `GLM_TOKEN` | GLM API token for LLM analysis | Optional* |\n| `WEBHOOK_SECRET` | Secret for webhook verification | Optional |\n| `WORKSPACE_PATH` | Repository workspace path | `process.cwd()` |\n| `AUTO_COMMENT` | Auto-add comments | `true` |\n| `AUTO_LABEL` | Auto-add labels | `true` |\n| `ANALYSIS_DEPTH` | Analysis depth | `medium` |\n| `TRIGGER_EVENTS` | Trigger events | `opened,edited,reopened` |\n| `EXCLUDE_LABELS` | Exclude labels | `` |\n| `INCLUDE_LABELS` | Include labels | `` |\n\n*At least one LLM API key is required for AI analysis\n\n## LLM Configuration\n\nThis action supports multiple LLM providers. You need to configure at least one API key:\n\n### DeepSeek (Recommended)\n```yaml\n- uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    deepseek-token: ${{ secrets.DEEPSEEK_TOKEN }}\n```\n\n### OpenAI\n```yaml\n- uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    openai-api-key: ${{ secrets.OPENAI_API_KEY }}\n```\n\n### GLM (ChatGLM)\n```yaml\n- uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    glm-token: ${{ secrets.GLM_TOKEN }}\n```\n\n### Setting up API Keys\n\n1. Go to your repository's **Settings** → **Secrets and variables** → **Actions**\n2. Click **New repository secret**\n3. Add one of the following secrets:\n   - `DEEPSEEK_TOKEN`: Your DeepSeek API token from [DeepSeek Platform](https://platform.deepseek.com/)\n   - `OPENAI_API_KEY`: Your OpenAI API key from [OpenAI Platform](https://platform.openai.com/api-keys)\n   - `GLM_TOKEN`: Your GLM API token from [GLM Platform](https://open.bigmodel.cn/)\n\n## Analysis Depths\n\n### Shallow\n- Quick analysis focusing on obvious patterns\n- Fast execution (\u003c 30 seconds)\n- Basic code references\n- Suitable for high-volume repositories\n\n### Medium (Default)\n- Balanced analysis with meaningful insights\n- Moderate execution time (30-60 seconds)\n- Comprehensive code exploration\n- Good for most use cases\n\n### Deep\n- In-depth analysis including dependencies\n- Longer execution time (60-120 seconds)\n- Architectural pattern analysis\n- Best for complex issues\n\n## 🔍 Analysis Transparency\n\nThis action provides detailed information about the analysis process to help you understand what happened:\n\n### Process Information\n- **Files Scanned**: Total number of files found in your repository\n- **Files Analyzed**: Number of files the AI determined were relevant\n- **Files Filtered**: Number of files excluded from analysis and why\n- **Analysis Steps**: Detailed breakdown of each analysis phase\n- **LLM Calls**: Information about AI service calls and their success/failure\n\n### When Analysis Results Are Limited\nIf the analysis produces limited results, the action will provide:\n- **Diagnostic Information**: Explanation of what might have gone wrong\n- **File Filtering Details**: Which types of files were excluded and why\n- **Improvement Suggestions**: How to write better issue descriptions for more comprehensive analysis\n- **Troubleshooting Tips**: Common issues and how to resolve them\n\n### Common File Filtering Scenarios\nThe AI may filter out files that seem unrelated to your issue:\n- Configuration files (jest.config.js, rollup.config.mjs, etc.) unless specifically mentioned\n- Test setup files unless the issue is about testing\n- Build and package files unless the issue mentions dependencies or build problems\n- Documentation files unless the issue is about documentation\n\n💡 **Tips for Better Analysis Results**:\n\n1. **Mention specific files**: \"Error in `jest.config.js`\" vs \"Configuration problem\"\n2. **Include error messages**: Copy-paste actual error text\n3. **Reference functions/classes**: \"Issue in `getUserData()` function\"\n4. **Specify file types**: \"Test configuration issue\" includes test files\n5. **Use keywords**: \"build\", \"config\", \"test\", \"dependency\" help include relevant files\n\n### Understanding Analysis Comments\n\nWhen the action analyzes your issue, it will add a comment with sections like:\n\n```markdown\n## 🤖 Automated Issue Analysis\n\n### 🔍 Analysis Process\n- Files scanned: 45\n- Files analyzed: 8\n- Files filtered: 37 (see details below)\n- Analysis steps: 5\n\n### ⚠️ Files Filtered from Analysis\n37 files were not included in the analysis. This may include:\n- jest.config.js - Configuration files often filtered by LLM as not directly relevant\n- rollup.config.mjs - Build configuration files typically excluded from issue analysis\n- __tests__/setup.ts - Test setup files may be filtered if issue doesn't mention testing\n\n💡 Suggestions to include these files:\n- Mention \"configuration\", \"config files\", or specific config file names if your issue relates to build/setup\n- Include \"test\", \"testing\", or \"test failure\" if your issue involves test problems\n```\n\nThis transparency helps you understand why certain files weren't considered and how to improve your issue description for better analysis.\n\n## Examples\n\n### Basic Issue Analysis\n\n```yaml\n- name: Analyze Issues\n  uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    deepseek-token: ${{ secrets.DEEPSEEK_TOKEN }}\n```\n\n### Advanced Configuration\n\n```yaml\n- name: Advanced Issue Analysis\n  uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    deepseek-token: ${{ secrets.DEEPSEEK_TOKEN }}\n    analysis-depth: deep\n    auto-comment: true\n    auto-label: true\n    exclude-labels: 'wontfix,duplicate'\n    include-labels: 'bug,enhancement'\n```\n\n### File Filtering Configuration\n\nControl which files are included in the analysis:\n\n```yaml\n- name: Custom File Filtering\n  uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    deepseek-token: ${{ secrets.DEEPSEEK_TOKEN }}\n    # File inclusion settings\n    include-config-files: true    # Include jest.config.js, rollup.config.mjs, etc.\n    include-test-files: true      # Include __tests__/, *.test.js, etc.\n    # Custom patterns (comma-separated)\n    include-patterns: \"*.config.js,*.config.ts,docker-compose.yml\"\n    exclude-patterns: \"*.min.js,*.bundle.js\"\n    force-include-files: \"important-config.js,critical-setup.ts\"\n```\n\n### Transparency and Diagnostics\n\nThe action now provides detailed process information in comments:\n\n```yaml\n- name: Analysis with Full Transparency\n  uses: unit-mesh/autodev-remote-agent-action@v0.3.1\n  with:\n    github-token: ${{ secrets.GITHUB_TOKEN }}\n    deepseek-token: ${{ secrets.DEEPSEEK_TOKEN }}\n    auto-comment: true  # Comments will include process details\n    analysis-depth: medium\n```\n\n**What you'll see in analysis comments:**\n- 📊 **Process Summary**: Files scanned vs. analyzed vs. filtered\n- ⚠️ **Filtered Files**: Specific files that were excluded and why\n- 🔄 **Analysis Steps**: Each step's success/failure with timing\n- 🧠 **LLM Calls**: AI service calls and any errors\n- 💡 **Improvement Suggestions**: How to get better analysis results\n\n### Webhook Server Setup\n\n```javascript\nconst { startWebhookServer } = require('@autodev/github-agent-action');\n\nconst server = await startWebhookServer({\n  port: 3000,\n  webhookSecret: process.env.WEBHOOK_SECRET,\n  githubToken: process.env.GITHUB_TOKEN\n});\n```\n\n## API Reference\n\n### GitHubActionService\n\nMain service class for processing issues.\n\n```typescript\nconst service = new GitHubActionService({\n  githubToken: 'your-token',\n  workspacePath: '/path/to/repo',\n  autoComment: true,\n  autoLabel: true\n});\n\nconst result = await service.processIssue({\n  owner: 'unit-mesh',\n  repo: 'autodev-workbench',\n  issueNumber: 81\n});\n```\n\n### IssueAnalyzer\n\nCore analysis engine.\n\n```typescript\nconst analyzer = new IssueAnalyzer(context);\nconst result = await analyzer.analyzeIssue({\n  depth: 'medium',\n  includeCodeSearch: true,\n  includeSymbolAnalysis: true\n});\n```\n\n### WebhookHandler\n\nWebhook server for real-time processing.\n\n```typescript\nconst handler = new WebhookHandler(actionService, {\n  port: 3000,\n  secret: 'webhook-secret',\n  onIssueOpened: async (payload) =\u003e {\n    console.log('Issue opened:', payload.issue.number);\n  }\n});\n\nawait handler.start();\n```\n\n## Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/unit-mesh/autodev-remote-agent-action.git\ncd autodev-remote-agent-action\n\n# Install dependencies (using pnpm for better dependency management)\npnpm install\n# or use npm\nnpm install\n\n# Build the package\nnpm run build\n\n# Run tests\nnpm test\n\n# Test locally\nnode dist/index.js --help\n```\n\n### Build Process\n\n```bash\n# Clean build (removes dist/ and rebuilds)\nnpm run build:clean\n\n# Development build with watch mode\nnpm run dev\n\n# Lint code\nnpm run lint\n\n# Test locally\nnode dist/index.js --help\n```\n\n### Project Structure\n\n```\nautodev-remote-agent-action/\n├── src/                   # Source code (TypeScript)\n│   ├── action.ts           # Main action service\n│   ├── issue-analyzer.ts   # Issue analysis logic\n│   ├── webhook-handler.ts  # Webhook server\n│   ├── types/             # Type definitions\n│   └── index.ts           # Main entry point\n├── dist/                  # Build output (committed to git)\n├── bin/\n│   └── action.js          # CLI entry point\n├── action.yml             # GitHub Action definition\n├── package.json\n└── README.md\n```\n\n### Release Process\n\n1. Make your changes and test locally\n2. Run `npm run build:clean` to ensure clean build\n3. Test the built action: `node dist/index.js`\n4. Update version in `package.json`\n5. Commit all changes including `dist/` files\n6. Create a git tag: `git tag v0.3.3 \u0026\u0026 git push origin v0.3.3`\n7. The new version will be available for use in GitHub Actions\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests\n5. Submit a pull request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Related Projects\n\n- [AutoDev GitHub Agent](https://github.com/unit-mesh/autodev) - Core analysis engine\n- [AutoDev Context Worker](https://github.com/unit-mesh/autodev) - Code context analysis\n- [AutoDev Worker Core](https://github.com/unit-mesh/autodev) - Core utilities\n\n## Support\n\n- 📖 [Documentation](https://github.com/unit-mesh/autodev-remote-agent-action)\n- 🐛 [Issue Tracker](https://github.com/unit-mesh/autodev-remote-agent-action/issues)\n- 💬 [Discussions](https://github.com/unit-mesh/autodev-remote-agent-action/discussions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funit-mesh%2Fautodev-remote-agent-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funit-mesh%2Fautodev-remote-agent-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funit-mesh%2Fautodev-remote-agent-action/lists"}