From f899132198b04daee1db9895cbeef7384d700e84 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sun, 29 May 2022 13:10:21 -0400 Subject: [PATCH] Add workflow for troubleshooting comment --- .github/workflows/troubleshooting.yml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/troubleshooting.yml diff --git a/.github/workflows/troubleshooting.yml b/.github/workflows/troubleshooting.yml new file mode 100644 index 0000000..4657584 --- /dev/null +++ b/.github/workflows/troubleshooting.yml @@ -0,0 +1,31 @@ +name: 'troubleshooting' + +on: + issues: + types: + - 'labeled' + - 'opened' + +jobs: + troubleshooting: + runs-on: 'ubuntu-latest' + + steps: + - uses: 'actions/github-script@v6' + if: '${{ github.event.label_name == 'bug' }}' + with: + script: |- + const msg = + `Hi there :wave:!\n` + + `\n` + + `Thank you for reporting an issue. Our team will triage this as soon as we ` + + `can. Please take a moment to review the ` + + `[troubleshooting steps](https://github.com/google-github-actions/auth/blob/main/docs/TROUBLESHOOTING.md)` + + `which lists common error messages and their resolution steps.`; + + await github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: msg, + });