|
| 1 | +name: Issue Completeness Check |
| 2 | + |
| 3 | +on: |
| 4 | + issues: |
| 5 | + types: [opened, edited, reopened] |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: read |
| 9 | + issues: write |
| 10 | + models: read |
| 11 | + |
| 12 | +jobs: |
| 13 | + check-completeness: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Analyze issue details |
| 18 | + id: ai |
| 19 | + uses: actions/ai-inference@v1 |
| 20 | + with: |
| 21 | + model: openai/gpt-4o-mini |
| 22 | + temperature: 0.2 |
| 23 | + system-prompt: | |
| 24 | + You help open-source maintainers triage GitHub issues. |
| 25 | + Review the issue for actionable completeness. |
| 26 | + If it is missing reproduction steps, environment or version details, screenshots/logs for UI bugs, or expected versus actual behavior, return one concise and friendly Markdown comment asking only for the missing details. |
| 27 | + If the issue is already complete enough to investigate, return an empty response. |
| 28 | + prompt: | |
| 29 | + Analyze this GitHub issue for completeness. |
| 30 | +
|
| 31 | + Title: |
| 32 | + ${{ github.event.issue.title }} |
| 33 | +
|
| 34 | + Body: |
| 35 | + ${{ github.event.issue.body }} |
| 36 | +
|
| 37 | + - name: Request missing issue details |
| 38 | + if: ${{ steps.ai.outputs.response != '' }} |
| 39 | + uses: actions/github-script@v7 |
| 40 | + env: |
| 41 | + AI_RESPONSE: ${{ steps.ai.outputs.response }} |
| 42 | + with: |
| 43 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + script: | |
| 45 | + const body = process.env.AI_RESPONSE?.trim(); |
| 46 | + if (!body) { |
| 47 | + core.info("Issue is complete enough; no comment needed."); |
| 48 | + return; |
| 49 | + } |
| 50 | +
|
| 51 | + await github.rest.issues.createComment({ |
| 52 | + owner: context.repo.owner, |
| 53 | + repo: context.repo.repo, |
| 54 | + issue_number: context.issue.number, |
| 55 | + body, |
| 56 | + }); |
0 commit comments