Skip to content

Commit 8acbdd1

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

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

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

Lines changed: 6 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
@@ -19,6 +19,9 @@ jobs:
1919
reproduction-steps-check:
2020
runs-on: ubuntu-latest
2121
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
2225
- name: Fetch Issue
2326
id: issue
2427
uses: actions/github-script@v7
@@ -39,11 +42,7 @@ jobs:
3942
uses: actions/ai-inference@v1
4043
with:
4144
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:
45+
system-prompt-file: './.github/workflows/prompts/bug-reproduction-requirements.txt'
4746
prompt: |
4847
Title: ${{ steps.issue.outputs.title }}
4948
Body: ${{ steps.issue.outputs.body }}
@@ -52,7 +51,7 @@ jobs:
5251
if: contains(join(github.event.issue.labels.*.name, ','), 'bug') && steps.analyze-issue.outputs.response != 'pass'
5352
uses: actions/github-script@v7
5453
env:
55-
AI_RESPONSE: steps.analyze-issue.outputs.response
54+
AI_RESPONSE: ${{ steps.analyze-issue.outputs.response }}
5655
with:
5756
script: |
5857
const issue_number = context.issue.number
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Given a bug report title and description for the useAudioPlayer package, return 'pass' if there is enough information to reliably reproduce the issue.
2+
3+
A passing bug report must include these details:
4+
1. A clear description of the issue; "it doesn't work" or something similarly vague is not acceptable
5+
2. A clear description of the expected behavior; "it should work" or something similarly vague is not acceptable
6+
3. Environment details containing the React version number, the version number of useAudioPlayer and the browser/runtime the user's application is running on
7+
4. A set of clear steps for how the issue can be reproduced
8+
9+
If any of these elements are missing, unclear or lack sufficient levels of detail, write a friendly response to the author including a brief description of what is missing from the bug report instead of 'pass'.
10+
11+
Consider the following title and body:

0 commit comments

Comments
 (0)