https://github.com/voltaflow/voltaflow-pr-checker
This GitHub Action uses the Deepseek API (via the OpenAI library) to interpret logs and provide clear explanations and possible solutions. The action comments the results directly on the PR.
https://github.com/voltaflow/voltaflow-pr-checker
action deepseek github interpretation logs openai pr
Last synced: 10 months ago
JSON representation
This GitHub Action uses the Deepseek API (via the OpenAI library) to interpret logs and provide clear explanations and possible solutions. The action comments the results directly on the PR.
- Host: GitHub
- URL: https://github.com/voltaflow/voltaflow-pr-checker
- Owner: voltaflow
- Created: 2025-03-15T17:31:43.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-15T18:11:03.000Z (10 months ago)
- Last Synced: 2025-03-15T18:31:30.764Z (10 months ago)
- Topics: action, deepseek, github, interpretation, logs, openai, pr
- Language: HTML
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Voltaflow Log Interpreter



A powerful GitHub Action that leverages the Deepseek API to analyze logs and provide clear, actionable interpretations directly on your PRs.
## ๐ Key Features
- **Intelligent Log Analysis**: Processes logs from any source (test runs, builds, deployments)
- **Error & Warning Detection**: Identifies patterns, errors, and important events
- **Clear Explanations**: Transforms technical jargon into understandable language
- **Solution Suggestions**: Provides potential fixes for identified problems
- **PR Integration**: Posts analysis directly as PR comments
- **Customizable**: Works with various log formats and GitHub workflow configurations

## ๐ Usage
### Basic Example
```yaml
name: Interpret Logs
on:
pull_request:
types: [opened, synchronize]
jobs:
analyze-logs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Step that generates logs
- name: Run tests
run: npm test > test_logs.txt 2>&1
continue-on-error: true
# Read the generated logs
- name: Read logs
id: logs
run: |
LOG_CONTENT=$(cat test_logs.txt)
LOG_CONTENT="${LOG_CONTENT//'%'/'%25'}"
LOG_CONTENT="${LOG_CONTENT//$'\n'/'%0A'}"
LOG_CONTENT="${LOG_CONTENT//$'\r'/'%0D'}"
echo "::set-output name=log_content::$LOG_CONTENT"
# Use this action to interpret the logs
- name: Interpret logs with Voltaflow
uses: your-username/voltaflow-pr-check@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deepseek_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
log_content: ${{ steps.logs.outputs.log_content }}
```
### For Extensive Logs (using artifacts)
```yaml
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Run tests and save logs
- name: Run tests
run: npm test > test_logs.txt 2>&1
continue-on-error: true
# Save logs as artifact
- name: Upload logs
uses: actions/upload-artifact@v3
with:
name: test-logs
path: test_logs.txt
analyze-logs:
needs: run-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Download logs
- name: Download logs
uses: actions/download-artifact@v3
with:
name: test-logs
# Read content and pass it to the action
- name: Read logs
id: read_logs
run: |
LOG_CONTENT=$(cat test_logs.txt)
echo "logs<> $GITHUB_OUTPUT
echo "$LOG_CONTENT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Use this action to interpret the logs
- name: Interpret logs with Voltaflow
uses: your-username/voltaflow-pr-check@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deepseek_api_key: ${{ secrets.DEEPSEEK_API_KEY }}
log_content: ${{ steps.read_logs.outputs.logs }}
```
For more advanced usage examples, see [Usage Examples](./wiki/Usage-Examples.md).
## โ๏ธ Inputs
| Name | Description | Required |
|------|-------------|----------|
| `github_token` | GitHub token to comment on the PR | Yes |
| `deepseek_api_key` | API Key for the Deepseek API | Yes |
| `log_content` | Log content to interpret. If not provided, a generic message will be sent. | No |
## ๐ค Outputs
| Name | Description |
|------|-------------|
| `interpretation` | The interpretation generated by Deepseek |
## ๐ง Setup & Configuration
1. Obtain a Deepseek API key from [Deepseek's platform](https://platform.deepseek.com)
2. Add the API key as a repository secret named `DEEPSEEK_API_KEY`
3. Configure your GitHub workflow to use the action as shown in the examples
4. Ensure your workflow captures logs you want to analyze
For detailed setup instructions, see [Setup Guide](./wiki/Setup.md).
## ๐ Documentation
We've created comprehensive documentation to help you get the most out of the Voltaflow Log Interpreter:
- [Architecture](./wiki/Architecture.md) - How the action works under the hood
- [Setup Guide](./wiki/Setup.md) - Step-by-step setup instructions
- [API Integration](./wiki/API-Integration.md) - Details of the Deepseek API integration
- [Usage Examples](./wiki/Usage-Examples.md) - Various scenarios and configurations
- [Testing](./wiki/Testing.md) - How to test the action locally and in CI
- [Troubleshooting](./wiki/Troubleshooting.md) - Solutions to common issues
## ๐งช Local Development
To work on this action locally:
```bash
# Clone the repository
git clone https://github.com/your-username/voltaflow-pr-check.git
cd voltaflow-pr-check
# Install dependencies
npm install
# Run tests
npm test
# Test with actual Deepseek API (if you have an API key)
DEEPSEEK_API_KEY=your_key npm test
```
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## ๐ License
This project is licensed under the ISC License - see the LICENSE file for details.
## โญ Support
If you find this action useful, please consider giving it a star on GitHub!
---
Made with โค๏ธ for developers struggling with cryptic log messages.