Skip to content

Commit

Permalink
Merge branch 'repo/issue-reporting-form-structure' of github.com:sieg…
Browse files Browse the repository at this point in the history
…erts/amplify-js into repo/issue-reporting-form-structure
  • Loading branch information
siegerts committed Mar 2, 2021
2 parents 1df3740 + 42c84df commit 9a7cd4e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,9 @@ npx envinfo --system --binaries --browsers --npmPackages --npmGlobalPackages
**Additional context**
Add any other context about the problem here.

**_You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app._**
**Is this a production issue?**
Are you experiencing this issue with a production application where end users are affected?

- [ ] (check box if yes)

**_You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app._**
50 changes: 50 additions & 0 deletions .github/workflows/bug-report-helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Issue Test

on: issues

jobs:
test:
name: Test
runs-on: ubuntu-latest
if: |
(github.event.action == 'edited' || github.event.action == 'opened') &&
!contains(github.event.issue.labels.*.name, 'production-issue') &&
(contains(github.event.issue.body, '- [x] (check box if yes)') ||
contains(github.event.issue.body, '- [ x] (check box if yes)') ||
contains(github.event.issue.body, '- [x ] (check box if yes)') ||
contains(github.event.issue.body, '- [ x ] (check box if yes)'))
steps:
- name: Add production-issue label
# Apache License - https://github.com/actions-ecosystem/action-add-labels
uses: actions-ecosystem/action-add-labels@v1
with:
# Create scoped-down token
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: production-issue

- name: Respond with suggestion
# MIT License - https://github.com/peter-evans/create-or-update-comment
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thanks for reporting this issue! The team has been alerted and someone will respond shortly.
In the mean time, please try installing a previous version of Amplify
```bash
rm -rf node_modules yarn.lock package-lock.json
npm i aws-amplify
```
- name: Sanitize Issue Title
run: |
export sanitized_issue_title=`echo "${{ github.event.issue.title }}" | sed 's/[^a-zA-Z0-9 ]//g'`
echo "sanitized_issue_title=$sanitized_issue_title" >> $GITHUB_ENV
- name: Execute Slack Workflow
# MIT License - https://github.com/fjogeleit/http-request-action
uses: fjogeleit/http-request-action@master
with:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
method: POST
data: '{ "issue_url": "${{ github.event.issue.html_url }}", "issue_title": "${{ env.sanitized_issue_title }}" }'
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class AmazonAIConvertPredictionsProvider extends AbstractConvertPredictio
},
};
} catch (err) {
Promise.reject(err);
return Promise.reject(err);
}
}

Expand Down

0 comments on commit 9a7cd4e

Please sign in to comment.