mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-04-23 20:36:09 +02:00
d75a367f39
Bumps the github-actions group with 7 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.2.2` | `5.0.0` | | [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) | `b3b07ba8b418998c39fb20f53e8b695cdcc8de1b` | `e97e2d8cc328f1b50210efc529dca0028893a2d9` | | [google/osv-scanner-action](https://github.com/google/osv-scanner-action) | `2.1.0` | `2.2.1` | | [ridedott/merge-me-action](https://github.com/ridedott/merge-me-action) | `2.10.124` | `2.10.126` | | [actions/first-interaction](https://github.com/actions/first-interaction) | `2.0.0` | `3.0.0` | | [actions/ai-inference](https://github.com/actions/ai-inference) | `1.2.8` | `2.0.0` | | [crate-ci/typos](https://github.com/crate-ci/typos) | `1.35.3` | `1.35.5` | Updates `actions/checkout` from 4.2.2 to 5.0.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/11bd71901bbe5b1630ceea73d27597364c9af683...08c6903cd8c0fde910a37f88322edcfb5dd907a8) Updates `dtolnay/rust-toolchain` from b3b07ba8b418998c39fb20f53e8b695cdcc8de1b to e97e2d8cc328f1b50210efc529dca0028893a2d9 - [Release notes](https://github.com/dtolnay/rust-toolchain/releases) - [Commits](https://github.com/dtolnay/rust-toolchain/compare/b3b07ba8b418998c39fb20f53e8b695cdcc8de1b...e97e2d8cc328f1b50210efc529dca0028893a2d9) Updates `google/osv-scanner-action` from 2.1.0 to 2.2.1 - [Release notes](https://github.com/google/osv-scanner-action/releases) - [Commits](https://github.com/google/osv-scanner-action/compare/b00f71e051ddddc6e46a193c31c8c0bf283bf9e6...456ceb78310755116e0a3738121351006286b797) Updates `ridedott/merge-me-action` from 2.10.124 to 2.10.126 - [Release notes](https://github.com/ridedott/merge-me-action/releases) - [Changelog](https://github.com/ridedott/merge-me-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/ridedott/merge-me-action/compare/f96a67511b4be051e77760230e6a3fb9cb7b1903...ad649157c69da4d34e601ee360de7a74ce4e2090) Updates `actions/first-interaction` from 2.0.0 to 3.0.0 - [Release notes](https://github.com/actions/first-interaction/releases) - [Commits](https://github.com/actions/first-interaction/compare/2d4393e6bc0e2efb2e48fba7e06819c3bf61ffc9...753c925c8d1ac6fede23781875376600628d9b5d) Updates `actions/ai-inference` from 1.2.8 to 2.0.0 - [Release notes](https://github.com/actions/ai-inference/releases) - [Commits](https://github.com/actions/ai-inference/compare/b81b2afb8390ee6839b494a404766bef6493c7d9...f347eae8ebabecb85d17f52960f909b8a4a8dad5) Updates `crate-ci/typos` from 1.35.3 to 1.35.5 - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](https://github.com/crate-ci/typos/compare/52bd719c2c91f9d676e2aa359fc8e0db8925e6d8...a4c3e43aea0a9e9b9e6578d2731ebd9a27e8f6cd) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: dtolnay/rust-toolchain dependency-version: e97e2d8cc328f1b50210efc529dca0028893a2d9 dependency-type: direct:production dependency-group: github-actions - dependency-name: google/osv-scanner-action dependency-version: 2.2.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: ridedott/merge-me-action dependency-version: 2.10.126 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: actions/first-interaction dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/ai-inference dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: crate-ci/typos dependency-version: 1.35.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
200 lines
7.4 KiB
YAML
200 lines
7.4 KiB
YAML
name: Issue Validation
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
models: read
|
|
|
|
jobs:
|
|
validate-issue:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
|
|
|
|
- name: Get issue templates
|
|
id: get-templates
|
|
run: |
|
|
# Read the issue templates
|
|
if [ -f ".github/ISSUE_TEMPLATE/01-bug-report.md" ]; then
|
|
echo "bug-template-exists=true" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
if [ -f ".github/ISSUE_TEMPLATE/02-feature-request.md" ]; then
|
|
echo "feature-template-exists=true" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create issue analysis prompt
|
|
id: create-prompt
|
|
env:
|
|
ISSUE_TITLE: ${{ github.event.issue.title }}
|
|
ISSUE_BODY: ${{ github.event.issue.body }}
|
|
ISSUE_LABELS: ${{ join(github.event.issue.labels.*.name, ', ') }}
|
|
run: |
|
|
cat > issue_analysis.txt << EOF
|
|
## Issue Content to Analyze:
|
|
|
|
**Title:** $ISSUE_TITLE
|
|
|
|
**Body:**
|
|
$ISSUE_BODY
|
|
|
|
**Labels:** $ISSUE_LABELS
|
|
EOF
|
|
|
|
- name: Validate issue with AI
|
|
id: validate
|
|
uses: actions/ai-inference@f347eae8ebabecb85d17f52960f909b8a4a8dad5 # v2.0.0
|
|
with:
|
|
prompt-file: issue_analysis.txt
|
|
system-prompt: |
|
|
You are an issue validation assistant for Donut Browser, an anti-detect browser.
|
|
|
|
Analyze the provided issue content and determine if it contains sufficient information based on these requirements:
|
|
|
|
**For Bug Reports, the issue should include:**
|
|
1. Clear description of the problem
|
|
2. Steps to reproduce the issue (numbered list preferred)
|
|
3. Expected vs actual behavior
|
|
4. Environment information (OS, browser version, etc.)
|
|
5. Error messages, stack traces, or screenshots if applicable
|
|
|
|
**For Feature Requests, the issue should include:**
|
|
1. Clear description of the requested feature
|
|
2. Use case or problem it solves
|
|
3. Proposed solution or how it should work
|
|
4. Priority level or importance
|
|
|
|
**General Requirements for all issues:**
|
|
1. Descriptive title
|
|
2. Sufficient detail to understand and act upon
|
|
3. Professional tone and clear communication
|
|
|
|
Respond in JSON format with the following structure:
|
|
```json
|
|
{
|
|
"is_valid": true|false,
|
|
"issue_type": "bug_report"|"feature_request"|"other",
|
|
"missing_info": [
|
|
"List of missing required information"
|
|
],
|
|
"suggestions": [
|
|
"Specific suggestions for improvement"
|
|
],
|
|
"overall_assessment": "Brief assessment of the issue quality"
|
|
}
|
|
```
|
|
|
|
Be constructive and helpful in your feedback. If the issue is incomplete, provide specific guidance on what's needed.
|
|
model: openai/gpt-4o
|
|
|
|
- name: Parse validation result and take action
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
# Prefer reading from the response file to avoid output truncation
|
|
RESPONSE_FILE='${{ steps.validate.outputs.response-file }}'
|
|
if [ -n "$RESPONSE_FILE" ] && [ -f "$RESPONSE_FILE" ]; then
|
|
RAW_OUTPUT=$(cat "$RESPONSE_FILE")
|
|
else
|
|
RAW_OUTPUT='${{ steps.validate.outputs.response }}'
|
|
fi
|
|
|
|
# Extract JSON if wrapped in markdown code fences; otherwise use raw
|
|
JSON_RESULT=$(printf "%s" "$RAW_OUTPUT" | sed -n '/```json/,/```/p' | sed '1d;$d')
|
|
if [ -z "$JSON_RESULT" ]; then
|
|
JSON_RESULT="$RAW_OUTPUT"
|
|
fi
|
|
|
|
# Parse JSON fields
|
|
IS_VALID=$(echo "$JSON_RESULT" | jq -r '.is_valid // false')
|
|
ISSUE_TYPE=$(echo "$JSON_RESULT" | jq -r '.issue_type // "other"')
|
|
MISSING_INFO=$(echo "$JSON_RESULT" | jq -r '.missing_info[]? // empty' | sed 's/^/- /')
|
|
SUGGESTIONS=$(echo "$JSON_RESULT" | jq -r '.suggestions[]? // empty' | sed 's/^/- /')
|
|
ASSESSMENT=$(echo "$JSON_RESULT" | jq -r '.overall_assessment // "No assessment provided"')
|
|
|
|
echo "Issue validation result: $IS_VALID"
|
|
echo "Issue type: $ISSUE_TYPE"
|
|
|
|
if [ "$IS_VALID" = "false" ]; then
|
|
# Create a comment asking for more information
|
|
cat > comment.md << EOF
|
|
## 🤖 Issue Validation
|
|
|
|
Thank you for submitting this issue! However, it appears that some required information might be missing to help us better understand and address your concern.
|
|
|
|
**Issue Type Detected:** \`$ISSUE_TYPE\`
|
|
|
|
**Assessment:** $ASSESSMENT
|
|
|
|
### 📋 Missing Information:
|
|
$MISSING_INFO
|
|
|
|
### 💡 Suggestions for Improvement:
|
|
$SUGGESTIONS
|
|
|
|
### 📝 How to Provide Additional Information:
|
|
|
|
Please edit your original issue description to include the missing information. Here are our issue templates for reference:
|
|
|
|
- **Bug Report Template:** [View Template](.github/ISSUE_TEMPLATE/01-bug-report.md)
|
|
- **Feature Request Template:** [View Template](.github/ISSUE_TEMPLATE/02-feature-request.md)
|
|
|
|
### 🔧 Quick Tips:
|
|
- For **bug reports**: Include step-by-step reproduction instructions, your environment details, and any error messages
|
|
- For **feature requests**: Describe the use case, expected behavior, and why this feature would be valuable
|
|
- Add **screenshots** or **logs** when applicable
|
|
|
|
Once you've updated the issue with the missing information, feel free to remove this comment or reply to let us know you've made the updates.
|
|
|
|
---
|
|
*This validation was performed automatically to ensure we have all the information needed to help you effectively.*
|
|
EOF
|
|
|
|
# Post the comment
|
|
gh issue comment ${{ github.event.issue.number }} --body-file comment.md
|
|
|
|
# Add a label to indicate validation needed
|
|
gh issue edit ${{ github.event.issue.number }} --add-label "needs-info"
|
|
|
|
echo "✅ Validation comment posted and 'needs-info' label added"
|
|
else
|
|
echo "✅ Issue contains sufficient information"
|
|
|
|
# Prepare a summary comment even when valid
|
|
cat > comment.md << EOF
|
|
## 🤖 Issue Validation
|
|
|
|
**Issue Type Detected:** \`$ISSUE_TYPE\`
|
|
|
|
**Assessment:** $ASSESSMENT
|
|
|
|
$( [ -n "$SUGGESTIONS" ] && echo "### 💡 Suggestions:" && echo "$SUGGESTIONS" )
|
|
|
|
---
|
|
*This validation was performed automatically to help triage issues.*
|
|
EOF
|
|
|
|
# Post the summary comment
|
|
gh issue comment ${{ github.event.issue.number }} --body-file comment.md
|
|
|
|
# Add appropriate labels based on issue type
|
|
case "$ISSUE_TYPE" in
|
|
"bug_report")
|
|
gh issue edit ${{ github.event.issue.number }} --add-label "bug"
|
|
;;
|
|
"feature_request")
|
|
gh issue edit ${{ github.event.issue.number }} --add-label "enhancement"
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
- name: Cleanup
|
|
run: |
|
|
rm -f issue_analysis.txt comment.md
|