Skip to content

Commit

Permalink
Merge branch 'main' into issue-branch-7793
Browse files Browse the repository at this point in the history
  • Loading branch information
amhinson authored Mar 11, 2021
2 parents 5809027 + 5a6cecd commit 114aaa5
Show file tree
Hide file tree
Showing 66 changed files with 1,492 additions and 219 deletions.
18 changes: 7 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -660,17 +660,13 @@ jobs:
- run:
name: 'Publish to Amplify Package'
command: |
if [ -z "$CIRCLE_PULL_REQUEST" ]; then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm whoami
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
git status
git --no-pager diff
yarn publish:$CIRCLE_BRANCH
else
echo "Skipping deploy."
fi
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm whoami
git config --global user.email $GITHUB_EMAIL
git config --global user.name $GITHUB_USER
git status
git --no-pager diff
yarn publish:$CIRCLE_BRANCH
post_release:
executor: build-executor
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ 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._**
**_You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app._**
248 changes: 248 additions & 0 deletions .github/ISSUE_TEMPLATE/new_bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
name: New Bug report
description: Create a report to help us improve Amplify JS
title: ''
issue_body: true
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Try to include as much information as you can.
- type: checkboxes
attributes:
label: |
Before opening, please confirm:
options:
- label: I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-js/issues?q=is%3Aissue+).
required: true
- label: I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-js/blob/master/CONTRIBUTING.md#bug-reports).
required: true
- label: I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
required: true
- type: markdown
attributes:
value: |
---
- type: checkboxes
attributes:
label: Is this a production issue?
description: |
Are you experiencing this issue with a production application where end users are affected?
options:
- label: (check box if yes)
- type: markdown
attributes:
value: |
## Environment
- type: dropdown
attributes:
label: JavaScript Framework
description: What JavaScript framework is being used?
multiple: true
options:
- Angular
- React
- React Native
- Vue
- Web Components
- Not applicable
validations:
required: true
- type: dropdown
attributes:
label: Amplify APIs
description: |
What [Amplify APIs](https://docs.amplify.aws/lib/q/platform/js) are being used?
multiple: true
options:
- Authentication
- Analytics
- REST API
- GraphQL API
- DataStore
- Storage
- Push Notifications
- Interactions
- PubSub
- Internationalization
- Cache
- Predictions
- Not applicable
validations:
required: true
- type: dropdown
attributes:
label: Amplify Categories
description: |
What [Amplify categories](https://github.com/aws-amplify/amplify-cli#category-specific-commands) are being used?
multiple: true
options:
- auth
- storage
- function
- api
- analytics
- hosting
- notifications
- interactions
- predictions
- xr
- Not applicable
- type: textarea
attributes:
label: Environment information
description: |
Please run the following command inside your project and copy/paste the output below:
```
npx envinfo --system --binaries --browsers --npmPackages --npmGlobalPackages
```
placeholder: |
```
# Please format as code block
```
validations:
required: true
- type: markdown
attributes:
value: |
## Details
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. Markdown formatting supported.
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen. Markdown formatting supported.
validations:
required: true
- type: textarea
attributes:
label: Reproduction steps
description: How do you trigger this bug? Please walk us through it step by step. Screenshots can be provided in the issue body below. Markdown formatting supported.
placeholder: |
1. Install '...'
2. Configure '...'
3. Go to '...'
4. See error
validations:
required: true
- type: textarea
attributes:
label: Code Snippet
description: |
Please provide a code snippet or a link to sample code of the issue you are experiencing to help us reproduce the issue.
**Be sure to remove any sensitive data.**
value: |
```javascript
// Put your code below this line.
```
- type: textarea
attributes:
label: Log output
description: |
For example, error messages, or stack traces.
You can turn on the debug mode to provide more info for us
by using the below statement in your app.
```javascript
window.LOG_LEVEL = 'DEBUG';
```
**Be sure to remove any sensitive data.**
placeholder: |
```
# Please format as code block
```
- type: markdown
attributes:
value: |
## Configuration
- type: textarea
attributes:
label: aws-exports.js
description: If applicable, please provide your `aws-exports.js` file.
placeholder: |
```javascript
const awsmobile = {
"aws_project_region": "us-east-1",
"aws_cognito_identity_pool_id": "us-east-1:xxx-xxxx-xxxx-xxxx-xxxxxxxx",
"aws_cognito_region": "us-east-1",
"aws_user_pools_id": "us-east-1_xxx",
"aws_user_pools_web_client_id": "xxxx",
"oauth": {}
};
```
- type: textarea
attributes:
label: Manual configuration
description: If applicable, please provide your **manual configuration** example.
placeholder: |
```json
{
Auth: {
identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab',
region: 'XX-XXXX-X',
identityPoolRegion: 'XX-XXXX-X',
userPoolId: 'XX-XXXX-X_abcd1234',
userPoolWebClientId: 'a1b2c3d4e5f6g7h8i9j0k1l2m3',
mandatorySignIn: false,
authenticationFlowType: 'USER_PASSWORD_AUTH',
oauth: {
domain: 'your_cognito_domain',
scope: ['phone', 'email', 'profile', 'openid', 'aws.cognito.signin.user.admin'],
redirectSignIn: 'http://localhost:3000/',
redirectSignOut: 'http://localhost:3000/',
responseType: 'code' // or 'token', note that REFRESH token will only be generated when the responseType is code
}
}
}
```
- type: textarea
attributes:
label: Additional configuration
description: |
If applicable, provide more configuration data.
For example, for Amazon Cognito, run `aws cognito-idp describe-user-pool --user-pool-id us-west-2_xxxxxx`.
**Be sure to remove any sensitive data***
placeholder: |
```json
```
- type: markdown
attributes:
value: |
## Smartphone (Optional)
- type: input
attributes:
label: Mobile Device
description: e.g. iPhone6
- type: input
attributes:
label: Mobile Operating System
description: For example, iOS8.1
- type: input
attributes:
label: Mobile Browser
description: For example, stock browser, Safari, Chrome
- type: input
attributes:
label: Mobile Browser Version
description: For example, 22
- type: markdown
attributes:
value: |
## Additional information and screenshots
- type: markdown
attributes:
value: >
If you have any additional information (i.e. `package.json`), workarounds, etc. for us, use the field below.
Please note, you can attach screenshots or screen recordings here, by
dragging and dropping files in the field below.
51 changes: 51 additions & 0 deletions .github/workflows/bug-report-helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Issue Test

on: issues

jobs:
test:
name: Test
runs-on: ubuntu-latest
if: |
false &&
(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 }}" }'
24 changes: 23 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Thank you for your interest in contributing to our project! <3 Whether it's a bu
- [Setting up for local development](#setting-up-for-local-development)
- [Architecture of the codebase](#architecture-of-the-codebase)
- [Steps towards contributions](#steps-towards-contributions)
- [Bug Reports](#bug-reports)
- [Pull Requests](#pull-requests)
- [Debugging](#debugging)
- [Release](#release)
Expand Down Expand Up @@ -166,6 +167,27 @@ Once you are done with Verdaccio, you can reset to the default registry by doing
yarn config set registry https://registry.yarnpkg.com
```

## Bug Reports

Bug reports and feature requests are always welcome. Good bug reports are extremely helpful, so thanks in advance!

When filing a bug, please try to be as detailed as possible. In addition to the bug report form information, details like these are incredibly useful:

- A reproducible test case or series of steps
- The date/commit/version(s) of the code you're running
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment

Guidelines for bug reports:

- Check to see if a [duplicate or closed issue](https://github.com/aws-amplify/amplify-js/issues?q=is%3Aissue+) already exists!
- Provide a short and descriptive issue title
- Remove any sensitive data from your examples or snippets
- Format any code snippets using [Markdown](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) syntax
- If you're not using the latest version of a [specific package](#packages-inside-amplify-js), see if the issue still persists after upgrading - this helps to isolate regressions!

Finally, thank you for taking the time to read this, and taking the time to write a good bug report.

# Pull Requests

This is mostly the same as GitHub's guide on creating a pull request.
Expand All @@ -181,7 +203,7 @@ _[Skip step 1 to 3 if you have already done this]_
- feat
- chore
- bug
- use slashes to seperate parts of branch names
- use slashes to separate parts of branch names
- Hyphenate well-defined branch name
5. Once your work is committed and you're ready to share, run test `yarn test`.
**Note:** Manually test your changes in a sample app with different edge cases and also test across different browsers and platform
Expand Down
Loading

0 comments on commit 114aaa5

Please sign in to comment.