-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtriage-unable-to-reproduce-comment.yml
More file actions
72 lines (66 loc) · 2.75 KB
/
Copy pathtriage-unable-to-reproduce-comment.yml
File metadata and controls
72 lines (66 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: 'Triage: Comment on unable-to-reproduce'
# Expected triggers: issues: [labeled]
on:
workflow_call:
inputs:
more_info_label:
description: 'Label to add when unable to reproduce'
type: string
required: false
default: 'more-info-needed'
unable_to_reproduce_label:
description: 'Label that triggers this workflow'
type: string
required: false
default: 'unable-to-reproduce'
additional_context:
description: 'Additional app-specific items to include in the reproduction steps (markdown list items)'
type: string
required: false
default: ''
permissions:
issues: write
jobs:
add-comment-to-unable-to-reproduce-issues:
runs-on: ubuntu-latest
steps:
- name: Check if unable-to-reproduce label was added
id: check
env:
UNABLE_LABEL: ${{ inputs.unable_to_reproduce_label || 'unable-to-reproduce' }}
ADDED_LABEL: ${{ github.event.label.name }}
run: |
if [ "$ADDED_LABEL" = "$UNABLE_LABEL" ]; then
echo "should_comment=true" >> $GITHUB_OUTPUT
else
echo "should_comment=false" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Add more-info-needed label
if: steps.check.outputs.should_comment == 'true'
run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: ${{ inputs.more_info_label || 'more-info-needed' }}
- name: Add comment
if: steps.check.outputs.should_comment == 'true'
run: |
BODY="Thank you for your issue! Unfortunately, we are unable to reproduce the issue you are experiencing. Please provide more information so we can help you.
Here are some tips for writing reproduction steps:
- Step by step instructions accompanied by screenshots or screencasts are the best.
- Be as specific as possible; include as much detail as you can.
- If not already provided, include:
- the version of the application you are using.
- the operating system you are using
- any environment factors you can think of.
- any custom configuration you are using.
$ADDITIONAL_CONTEXT
- If relevant and can be shared, provide the repository or code you are using."
gh issue comment "$NUMBER" --body "$BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
ADDITIONAL_CONTEXT: ${{ inputs.additional_context }}