2022-09-21 08:58:15 +00:00
name : Issue Labeled
on :
issues :
types : [ labeled]
2022-11-16 20:44:25 +00:00
permissions : # added using https://github.com/step-security/secure-workflows
contents : read
2022-09-21 08:58:15 +00:00
jobs :
2024-03-21 13:43:40 +00:00
issue-labeled-with-status :
name : status/{confirmed,reviewed} label added
if : github.event.label.name == 'status/confirmed' || github.event.label.name == 'status/reviewed'
runs-on : ubuntu-latest
steps :
- name : Generate GitHub App token
uses : electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
id : generate-token
with :
creds : ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org : electron
- name : Set status
uses : dsanders11/project-actions/edit-item@82e99438bd44a14ad18d92d036dbc25cbfb9a8c4 # v1.2.0
with :
token : ${{ steps.generate-token.outputs.token }}
project-number : 90
field : Status
field-value : ✅ Triaged
2023-08-15 01:28:17 +00:00
issue-labeled-blocked :
name : blocked/* label added
if : startsWith(github.event.label.name, 'blocked/')
runs-on : ubuntu-latest
steps :
- name : Generate GitHub App token
2024-02-14 10:13:03 +00:00
uses : electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
2023-08-15 01:28:17 +00:00
id : generate-token
2023-08-30 15:09:33 +00:00
with :
creds : ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
org : electron
2023-08-15 01:28:17 +00:00
- name : Set status
2024-02-14 10:13:03 +00:00
uses : dsanders11/project-actions/edit-item@82e99438bd44a14ad18d92d036dbc25cbfb9a8c4 # v1.2.0
2023-08-15 01:28:17 +00:00
with :
2023-09-28 15:26:04 +00:00
token : ${{ steps.generate-token.outputs.token }}
project-number : 90
2023-08-15 01:28:17 +00:00
field : Status
2023-09-28 15:26:04 +00:00
field-value : 🛑 Blocked
2023-08-15 01:28:17 +00:00
issue-labeled-blocked-need-repro :
2023-05-08 08:07:04 +00:00
name : blocked/need-repro label added
if : github.event.label.name == 'blocked/need-repro'
2022-11-16 20:44:25 +00:00
permissions :
issues : write # for actions-cool/issues-helper to update issues
2022-09-21 08:58:15 +00:00
runs-on : ubuntu-latest
steps :
2023-08-15 01:32:38 +00:00
- name : Check if comment needed
id : check-for-comment
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
GH_REPO : electron/electron
run : |
set -eo pipefail
2023-09-14 18:01:07 +00:00
COMMENT_COUNT=$(gh issue view ${{ github.event.issue.number }} --comments --json comments | jq '[ .comments[] | select(.author.login == "electron-issue-triage" or .authorAssociation == "OWNER" or .authorAssociation == "MEMBER") | select(.body | startswith("<!-- blocked/need-repro -->")) ] | length')
2023-08-15 01:32:38 +00:00
if [[ $COMMENT_COUNT -eq 0 ]]; then
echo "SHOULD_COMMENT=1" >> "$GITHUB_OUTPUT"
fi
2023-08-30 15:09:33 +00:00
- name : Generate GitHub App token
if : ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
2024-02-14 10:13:03 +00:00
uses : electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
2023-08-30 15:09:33 +00:00
id : generate-token
with :
creds : ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
2023-05-08 08:07:04 +00:00
- name : Create comment
2023-08-15 01:32:38 +00:00
if : ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
2024-05-08 08:42:32 +00:00
uses : actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
2022-09-21 08:58:15 +00:00
with :
actions : 'create-comment'
2023-08-30 15:09:33 +00:00
token : ${{ steps.generate-token.outputs.token }}
2022-09-21 08:58:15 +00:00
body : |
2023-08-15 01:32:38 +00:00
<!-- blocked/need-repro -->
2022-09-21 08:58:15 +00:00
Hello @${{ github.event.issue.user.login }}. Thanks for reporting this and helping to make Electron better!
Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, [Electron Fiddle](https://www.electronjs.org/fiddle) is a great tool for making small test cases and makes it easy to publish your test case to a [gist](https://gist.github.com) that Electron maintainers can use.
2023-02-01 11:59:16 +00:00
Stand-alone test cases make fixing issues go more smoothly : it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
2022-09-21 08:58:15 +00:00
2023-08-15 01:32:38 +00:00
Now adding the https://github.com/electron/electron/labels/blocked%2Fneed-repro label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.