Skip to content

Commit c410828

Browse files
authored
Merge branch 'main' into patch-2
2 parents 416864d + 88915b1 commit c410828

File tree

1,790 files changed

+57981
-17657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,790 files changed

+57981
-17657
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
* @aws-amplify/amplify-support-eng
2-
/src/pages/** @aws-amplify/amplify-support-eng
3-
/src/pages/cli @aws-amplify/amplify-cli @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
4-
/src/pages/console @aws-amplify/amplify-hosting @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
5-
/src/pages/guides @aws-amplify/developer-advocates @aws-amplify/documentation-team @aws-amplify/amplify-support-eng
6-
/src/fragments/** @aws-amplify/amplify-support-eng
7-
/src/fragments/**/android @aws-amplify/amplify-android @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
8-
/src/fragments/**/flutter @aws-amplify/amplify-flutter @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
9-
/src/fragments/**/ios @aws-amplify/amplify-ios @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
10-
/src/fragments/**/js @aws-amplify/amplify-js @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
11-
/src/fragments/cli @aws-amplify/amplify-cli @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
12-
/src/fragments/console @aws-amplify/amplify-hosting @aws-amplify/documentation-team @aws-amplify/amplify-pms @aws-amplify/amplify-support-eng
13-
/src/fragments/guides @aws-amplify/developer-advocates @aws-amplify/documentation-team @aws-amplify/amplify-support-eng
1+
* @aws-amplify/documentation-team
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Content Issue
3+
about: Create a report to point out content issues or missing content.
4+
5+
---
6+
7+
**Describe the content issue**:
8+
A clear and concise description of what the content issue is. Is there content missing or is there incorrect content?
9+
10+
**URL page where content issue is**:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
1-
_Issue #, if available:_
1+
#### Description of changes:
22

3-
_Description of changes:_
3+
#### Related GitHub issue #, if available:
44

5-
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
5+
### Instructions
6+
7+
**If this PR should not be merged upon approval for any reason, please submit as a DRAFT**
8+
9+
Which product(s) are affected by this PR (if applicable)?
10+
- [ ] amplify-cli
11+
- [ ] amplify-ui
12+
- [ ] amplify-studio
13+
- [ ] amplify-hosting
14+
- [ ] amplify-libraries
15+
16+
Which platform(s) are affected by this PR (if applicable)?
17+
- [ ] JS
18+
- [ ] iOS
19+
- [ ] Android
20+
- [ ] Flutter
21+
- [ ] React Native
22+
23+
**Please add the product(s)/platform(s) affected to the PR title**
24+
25+
#### Checks
26+
27+
- [ ] Does this PR conform to [the styleguide](https://github.com/aws-amplify/docs/blob/main/STYLEGUIDE.md)?
28+
29+
- [ ] Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.
30+
31+
- [ ] Are any files being deleted with this PR? If so, have the needed redirects been created?
32+
33+
- [ ] Are all links in MDX files using the MDX link syntax rather than HTML link syntax? <br />
34+
_ref: MDX: `[link](https://link.com)`
35+
HTML: `<a href="https://link.com">link</a>`_
36+
37+
### When this PR is ready to merge, please check the box below
38+
- [ ] Ready to merge
39+
40+
_By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license._

.github/actions/fetch_amplify_backend/action.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/codeql/codeql-config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
paths-ignore:
2+
- public

.github/workflows/build.yml

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,21 @@
11
name: Test
22
on:
3-
pull_request_target:
3+
pull_request:
44
branches: [main]
5-
types: [opened, synchronize, labeled]
6-
permissions:
7-
pull-requests: write # used to remove label
8-
id-token: write
9-
contents: read
5+
types: [opened, synchronize]
106
jobs:
117
build:
128
name: Build
139
runs-on: ubuntu-latest
14-
# We run tests only if it's:
15-
# 1) pull request not from a fork (ie. internal PR), or
16-
# 2) pull request from a fork (ie. external PR) that was added "run-tests" label
17-
if: |
18-
(github.event.pull_request.head.repo.full_name == github.repository) ||
19-
(github.event.action == 'labeled' && github.event.label.name == 'run-tests')
2010
steps:
21-
- name: Remove run-tests label, if applicable
22-
if: always() && github.event.label.name == 'run-tests'
23-
uses: actions/[email protected]
24-
with:
25-
github-token: ${{ secrets.GITHUB_TOKEN }}
26-
script: |
27-
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
28-
const label = 'run-tests';
29-
github.issues.removeLabel({ owner, repo, issue_number, name: label });
3011
- name: Checkout Repo
31-
uses: actions/checkout@main
32-
with:
33-
ref: ${{ github.event.pull_request.head.sha }}
34-
repository: ${{ github.event.pull_request.head.repo.full_name }}
35-
persist-credentials: false
12+
uses: actions/checkout@v3
3613
- name: Setup Node.js 14.x
3714
uses: actions/setup-node@main
3815
with:
3916
node-version: 14.x
4017
- name: Install Dependencies
4118
run: yarn
42-
- name: Run Spellcheck
43-
run: yarn spellcheck
44-
- name: Fetch Amplify backend configuration
45-
uses: ./.github/actions/fetch_amplify_backend
46-
with:
47-
role-to-assume: ${{ secrets.AWS_ARN_ROLE }}
48-
aws-region: ${{ secrets.AWS_REGION }}
49-
app-id: ${{ secrets.APP_ID }}
50-
env-name: ${{ secrets.ENV_NAME }}
5119
- name: Run tests
5220
run: yarn test
5321
- name: Run Build
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deleted Assets Workflow
2+
on:
3+
pull_request:
4+
branches: [main]
5+
types: [opened, synchronize, labeled]
6+
env:
7+
DIFF_DIRECTORIES: 'public'
8+
jobs:
9+
onPrOpen:
10+
name: Check if assets were deleted on PR opened
11+
runs-on: ubuntu-latest
12+
if: github.event.action == 'opened'
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
with:
17+
# Minimal depth 2 so we can checkout the commit before possible merge commit.
18+
fetch-depth: 2
19+
- name: Get count of deleted files
20+
env:
21+
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.pull_request.head.sha }}
22+
run: |
23+
git fetch origin main
24+
echo "DELETED_FILES_ON_OPENED=$(git diff --name-status --diff-filter=D origin/main -- ${{ env.DIFF_DIRECTORIES }} ${{ env.GITHUB_PULL_REQUEST_HEAD_SHA }} -- ${{ env.DIFF_DIRECTORIES }} | wc -l)" >> $GITHUB_ENV
25+
echo "Deleted file count: ${{ env.DELETED_FILES_ON_OPENED }}"
26+
- name: Fail status check if there are deleted files
27+
if: ${{ env.DELETED_FILES_ON_OPENED > 0 }}
28+
run: exit 1
29+
onPrSync:
30+
name: Check if assets were deleted on PR sync
31+
runs-on: ubuntu-latest
32+
if: github.event.action == 'synchronize'
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v3
36+
with:
37+
# Minimal depth 2 so we can checkout the commit before possible merge commit.
38+
fetch-depth: 2
39+
- name: Get count of deleted files from last sync
40+
env:
41+
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
42+
GITHUB_EVENT_AFTER: ${{ github.event.after }}
43+
run: |
44+
git fetch origin ${{ github.event.before }} --depth=1
45+
echo "DELETED_FILES_ON_SYNC=$(git diff --name-status --diff-filter=D ${{ env.GITHUB_EVENT_BEFORE}} -- ${{ env.DIFF_DIRECTORIES }} ${{ env.GITHUB_EVENT_AFTER }} -- ${{ env.DIFF_DIRECTORIES }} | wc -l)" >> $GITHUB_ENV
46+
echo "Deleted file count: ${{ env.DELETED_FILES_ON_SYNC }}"
47+
- name: Fail status check if there are deleted files
48+
if: ${{ env.DELETED_FILES_ON_SYNC > 0 }}
49+
run: exit 1
50+
failStatusCheck:
51+
name: Fail status check if assets have not been verified
52+
runs-on: ubuntu-latest
53+
if: contains(github.event.pull_request.labels.*.name, 'deleted-assets')
54+
steps:
55+
- name: Exit with error
56+
run: exit 1
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Redirects Workflow
2+
on:
3+
pull_request:
4+
branches: [main]
5+
types: [opened, synchronize, labeled]
6+
env:
7+
DIFF_DIRECTORIES: 'src/pages src/fragments'
8+
jobs:
9+
onPrOpen:
10+
name: Check if redirects are needed on PR opened
11+
runs-on: ubuntu-latest
12+
if: github.event.action == 'opened'
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
with:
17+
# Minimal depth 2 so we can checkout the commit before possible merge commit.
18+
fetch-depth: 2
19+
- name: Get count of deleted files
20+
env:
21+
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.pull_request.head.sha }}
22+
run: |
23+
git fetch origin main
24+
echo "DELETED_FILES_ON_OPENED=$(git diff --name-status --diff-filter=D origin/main -- ${{ env.DIFF_DIRECTORIES }} ${{ env.GITHUB_PULL_REQUEST_HEAD_SHA }} | wc -l)" >> $GITHUB_ENV
25+
- name: Print number of deleted files
26+
run: |
27+
echo "Deleted file count: ${{ env.DELETED_FILES_ON_OPENED }}"
28+
- name: Fail status check if there are deleted files
29+
if: ${{ env.DELETED_FILES_ON_OPENED > 0 }}
30+
run: exit 1
31+
onPrSync:
32+
name: Check if redirects are needed on PR sync
33+
runs-on: ubuntu-latest
34+
if: github.event.action == 'synchronize'
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v3
38+
with:
39+
# Minimal depth 2 so we can checkout the commit before possible merge commit.
40+
fetch-depth: 2
41+
- name: Get count of deleted files from last sync
42+
env:
43+
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
44+
GITHUB_EVENT_AFTER: ${{ github.event.after }}
45+
run: |
46+
git fetch origin ${{ github.event.before }} --depth=1
47+
echo "DELETED_FILES_ON_SYNC=$(git diff --name-status --diff-filter=D ${{ env.GITHUB_EVENT_BEFORE}} -- ${{ env.DIFF_DIRECTORIES }} ${{ env.GITHUB_EVENT_AFTER }} | wc -l)" >> $GITHUB_ENV
48+
- name: Print number of deleted files
49+
run: |
50+
echo "Deleted file count: ${{ env.DELETED_FILES_ON_OPENED }}"
51+
- name: Fail status check if there are deleted files
52+
if: ${{ env.DELETED_FILES_ON_SYNC > 0 }}
53+
run: exit 1
54+
failStatusCheck:
55+
name: Fail status check if redirects have not been added
56+
runs-on: ubuntu-latest
57+
if: contains(github.event.pull_request.labels.*.name, 'redirects-needed')
58+
steps:
59+
- name: Exit with error
60+
run: exit 1

.github/workflows/codeql.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 'CodeQL'
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
jobs:
7+
CodeQL-Build:
8+
name: CodeQL Build
9+
runs-on: ubuntu-latest
10+
permissions:
11+
actions: read
12+
contents: read
13+
security-events: write
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
language: ['javascript']
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
with:
24+
# Minimal depth 2 so we can checkout the commit before possible merge commit.
25+
fetch-depth: 2
26+
27+
# Initializes the CodeQL tools for scanning.
28+
- name: Initialize CodeQL
29+
uses: github/codeql-action/init@v2
30+
with:
31+
languages: ${{ matrix.language }}
32+
config-file: ./.github/codeql/codeql-config.yml
33+
34+
- name: Perform CodeQL Analysis
35+
uses: github/codeql-action/analyze@v2
36+
with:
37+
category: '/language:${{matrix.language}}'

.github/workflows/spellcheck.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Spellcheck
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
permissions:
6+
contents: read
7+
jobs:
8+
Spellcheck:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
- name: Setup Node.js 14.x
14+
uses: actions/setup-node@main
15+
with:
16+
node-version: 14.x
17+
- name: Install Dependencies
18+
run: yarn
19+
- name: Run Spellcheck
20+
run: yarn spellcheck

0 commit comments

Comments
 (0)