Skip to content

Commit 97b5ea3

Browse files
committed
Fix issue in bug reproduction workflow and organize system prompt into file
1 parent dce810c commit 97b5ea3

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/bug-reproduction-instructions.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
name: Bug Report Reproduction Check
99
on:
1010
issues:
11-
types: [opened, labeled]
11+
types: [labeled]
1212

1313
permissions:
1414
contents: read
@@ -39,11 +39,7 @@ jobs:
3939
uses: actions/ai-inference@v1
4040
with:
4141
model: mistral-ai/ministral-3b
42-
system-prompt: |
43-
Given a bug report title and text for a web application, return 'pass' if there is enough information to reliably reproduce the issue,
44-
meaning the report clearly describes the steps to reproduce the problem, specifies the expected and actual behavior, and includes environment details such as browser and operating system;
45-
if any of these elements are missing or unclear, return a brief description of what is missing in a friendly response to the author instead of 'pass'.
46-
Consider the following title and body:
42+
system-prompt-file: './.github/workflows/prompts/bug-reproduction-requirements.txt'
4743
prompt: |
4844
Title: ${{ steps.issue.outputs.title }}
4945
Body: ${{ steps.issue.outputs.body }}
@@ -52,7 +48,7 @@ jobs:
5248
if: contains(join(github.event.issue.labels.*.name, ','), 'bug') && steps.analyze-issue.outputs.response != 'pass'
5349
uses: actions/github-script@v7
5450
env:
55-
AI_RESPONSE: steps.analyze-issue.outputs.response
51+
AI_RESPONSE: ${{ steps.analyze-issue.outputs.response }}
5652
with:
5753
script: |
5854
const issue_number = context.issue.number
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Given a bug report title and description for a custom React hook NPM module, return 'pass' if there is enough information to reliably reproduce the issue.
2+
A passing bug report must meet these criteria:
3+
1. A clear description of the bug; "it doesn't work" or something similarly vague is not acceptable
4+
2. A clear description of the expected behavior; "it should work" or something similarly vague is not acceptable
5+
3. Environment details containing at least the React version number, the version number of the library and the browser/runtime the user's application is running on
6+
7+
If any of these elements are missing or unclear, return a brief description of what is missing in a friendly response to the author instead of 'pass'.
8+
9+
Consider the following title and body:

0 commit comments

Comments
 (0)