Skip to content

Commit

Permalink
Jtbd expander (#5682)
Browse files Browse the repository at this point in the history
* accordion prototype in progress

* accordion in progress

* accordion is in progress

* accordion prototype is completed

* Adding upgrade guide for Apollo SDK

* added Upgrade Guide content

* feat(data): add GraphQL API optimistic UI docs (#5572)

* feat(data): add GraphQL API optimistic UI docs

* GraphQL API optimistic UI docs updates

* GraphQL API optimistic UI docs updates; update dictionary

* Update src/fragments/lib/graphqlapi/js/optimistic-ui.mdx

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* update API + Storage docs phrasing

* Update src/fragments/lib/graphqlapi/js/optimistic-ui.mdx

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* Update src/fragments/lib/graphqlapi/js/optimistic-ui.mdx

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>

* update link

* add preliminary callout

* optimistic ui + api docs updates

* address PR feedback

* update optimistic UI + api complete TS example

* update optimistic UI + API docs

* update getting started, code examples, and callouts

* add code samples and docs for all CRUD operations

* add section on loading and error states

* update loading / error states section, update callout, update final example, add additional docs content

* update guidance for interacting with the cache on update

* update phrasing

* address PR feedback

* add all JS code examples; reformat TS examples

* address PR feedback

* Apply suggestions from code review

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>

* address PR feedback

---------

Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>

* Update [platform].mdx

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/directory/directory.mjs

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update getting started first paragraph wording (#5570)

* Update getting started first paragraph wording

* Update src/pages/start/q/integration/[integration].mdx

Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

---------

Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

* Update storage.mdx

* fixed a formatting issue

* chore(deps): bump @aws-amplify/ui-react from 5.0.2 to 5.0.3 (#5593)

Bumps [@aws-amplify/ui-react](https://github.com/aws-amplify/amplify-ui/tree/HEAD/packages/react) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/aws-amplify/amplify-ui/releases)
- [Changelog](https://github.com/aws-amplify/amplify-ui/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-ui/commits/@aws-amplify/ui-react@5.0.3/packages/react)

---
updated-dependencies:
- dependency-name: "@aws-amplify/ui-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update swift prereq for visionOS preview support (#5598)

* Addresses #5604 (#5616)

* Amplify Android: replace deprecated id with identifier method (#5613)

* replace deprecated id with identifier method

* fix indentation

* Fix formatting

* Handle AmplifyException separately before delete

* Handle AmplifyException separately before update

* Handle AmplifyException separately before delete

* Update deleted assets workflow (#5591)

* Update deleted assets workflow

* Refactor redirects label workflow to use add_label_for_deleted_files.js

* Update mergify.yml to remove adding the deleted-assets label

* Update job name and some fixes

* chore(JS): Add confirmSignIn() flows to JS sign in docs (#5566)

* update React Native dependency installations to INCLUDE `amazon-cognito-identity-js` or REMOVE `core-js` as needed

* add confirmSignIn() flows to JS sign in docs

* minor fixes to preamble

* updates to signInWithCustomChallenge code snippet

* updated confirmSignIn() example to use variable passed in and fixed phrasing/typo.

* update signInWithMFA function after getting additional clarity

* Latest npm init vue support (#5429)

* Add TS examples for getting-started pages of the Auth category (#5587)

* Initial commit

* chore:address PR feedback

* chore:add mfa ts and js examples (#3)

Co-authored-by: idevk <idevk@amazon.com>

* Revert "chore:add mfa ts and js examples (#3)"

This reverts commit ef0305f.

---------

Co-authored-by: idevk <idevk@amazon.com>

* chore(deps): bump @aws-amplify/graphql-transformer-interfaces (#5605)

Bumps [@aws-amplify/graphql-transformer-interfaces](https://github.com/aws-amplify/amplify-category-api/tree/HEAD/packages/amplify-graphql-transformer-interfaces) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/aws-amplify/amplify-category-api/releases)
- [Changelog](https://github.com/aws-amplify/amplify-category-api/blob/main/packages/amplify-graphql-transformer-interfaces/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-category-api/commits/@aws-amplify/graphql-transformer-interfaces@2.2.3/packages/amplify-graphql-transformer-interfaces)

---
updated-dependencies:
- dependency-name: "@aws-amplify/graphql-transformer-interfaces"
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* added aria-label to the search box (#5612)

* Revert aa order (#5628)

* Revert "Reorder AA scripts (#5575)"

This reverts commit ea0b58a.

* test amplify yml changes

* test env var

* test env var

* Update env var reference

* update in customhttp.yml

* chore(deps): bump @aws-amplify/ui-react from 5.0.3 to 5.0.4 (#5626)

Bumps [@aws-amplify/ui-react](https://github.com/aws-amplify/amplify-ui/tree/HEAD/packages/react) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/aws-amplify/amplify-ui/releases)
- [Changelog](https://github.com/aws-amplify/amplify-ui/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-ui/commits/@aws-amplify/ui-react@5.0.4/packages/react)

---
updated-dependencies:
- dependency-name: "@aws-amplify/ui-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(data): update code examples for optimistic UI docs - update types, update return value for mutation hooks, and add additional cache invalidation (#5602)

* feat(data): update types in code examples for optimistic UI docs

* feat(data): update types in code examples for optimistic UI docs

* Update getting started first paragraph wording (#5570)

* Update getting started first paragraph wording

* Update src/pages/start/q/integration/[integration].mdx

Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

---------

Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>

* Adding upgrade guide for Apollo SDK

* added Upgrade Guide content

* Update [platform].mdx

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/directory/directory.mjs

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* Update src/pages/lib/graphqlapi/upgrade-guide/q/platform/[platform].mdx

Co-authored-by: David McAfee <mcafd@amazon.com>

* fixed a formatting issue

* Update storage.mdx

* chore(deps): bump @aws-amplify/ui-react from 5.0.2 to 5.0.3 (#5593)

Bumps [@aws-amplify/ui-react](https://github.com/aws-amplify/amplify-ui/tree/HEAD/packages/react) from 5.0.2 to 5.0.3.
- [Release notes](https://github.com/aws-amplify/amplify-ui/releases)
- [Changelog](https://github.com/aws-amplify/amplify-ui/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-ui/commits/@aws-amplify/ui-react@5.0.3/packages/react)

---
updated-dependencies:
- dependency-name: "@aws-amplify/ui-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* update swift prereq for visionOS preview support (#5598)

* Addresses #5604 (#5616)

* Amplify Android: replace deprecated id with identifier method (#5613)

* replace deprecated id with identifier method

* fix indentation

* Fix formatting

* Handle AmplifyException separately before delete

* Handle AmplifyException separately before update

* Handle AmplifyException separately before delete

* Update deleted assets workflow (#5591)

* Update deleted assets workflow

* Refactor redirects label workflow to use add_label_for_deleted_files.js

* Update mergify.yml to remove adding the deleted-assets label

* Update job name and some fixes

* chore(JS): Add confirmSignIn() flows to JS sign in docs (#5566)

* update React Native dependency installations to INCLUDE `amazon-cognito-identity-js` or REMOVE `core-js` as needed

* add confirmSignIn() flows to JS sign in docs

* minor fixes to preamble

* updates to signInWithCustomChallenge code snippet

* updated confirmSignIn() example to use variable passed in and fixed phrasing/typo.

* update signInWithMFA function after getting additional clarity

* Latest npm init vue support (#5429)

* Add TS examples for getting-started pages of the Auth category (#5587)

* Initial commit

* chore:address PR feedback

* chore:add mfa ts and js examples (#3)

Co-authored-by: idevk <idevk@amazon.com>

* Revert "chore:add mfa ts and js examples (#3)"

This reverts commit ef0305f.

---------

Co-authored-by: idevk <idevk@amazon.com>

* chore(deps): bump @aws-amplify/graphql-transformer-interfaces (#5605)

Bumps [@aws-amplify/graphql-transformer-interfaces](https://github.com/aws-amplify/amplify-category-api/tree/HEAD/packages/amplify-graphql-transformer-interfaces) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/aws-amplify/amplify-category-api/releases)
- [Changelog](https://github.com/aws-amplify/amplify-category-api/blob/main/packages/amplify-graphql-transformer-interfaces/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-category-api/commits/@aws-amplify/graphql-transformer-interfaces@2.2.3/packages/amplify-graphql-transformer-interfaces)

---
updated-dependencies:
- dependency-name: "@aws-amplify/graphql-transformer-interfaces"
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* added aria-label to the search box (#5612)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Abdallah Shaban <awshaban@amazon.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>
Co-authored-by: Rene Brandel <renbran@amazon.com>
Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian Saultz <52051793+atierian@users.noreply.github.com>
Co-authored-by: Ankit Shah <22114629+ankpshah@users.noreply.github.com>
Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>
Co-authored-by: Chris Womack <67726635+cwomack@users.noreply.github.com>
Co-authored-by: devnotfound <devendra.khanolkar@yahoo.com>
Co-authored-by: idevk <idevk@amazon.com>
Co-authored-by: Roman <lavrenr@amazon.com>

* Updating text in Quickstart section (#5642)

* Updating description of Amplify Badge program (#5641)

* Updating wording in How it Works section (#5639)

* fix(amplify_flutter): datastore hub example (#5629)

* fix(amplify_flutter): datastore hub example

* Update hubSubscription type

* minor

* fix

* Fix SavePosts example (#5621)

* fix(storage): Add information about request options (#5611)

* fix(storage): Add information about request options

* Fix code format

* update swift storage escape hatch SDK documentation links (#5608)

* update swift storage category upload (#5607)

* update swift storage category upload

* update for PR comment

* update for PR comment

* add contribute getting-started page to directory (#5643)

* add contribute getting-started page to directory

* move contribute getting started to pathMap

---------

Co-authored-by: Jacob Logan <lognjc@amazon.com>

* chore(deps): bump @aws-amplify/graphql-transformer-interfaces (#5634)

Bumps [@aws-amplify/graphql-transformer-interfaces](https://github.com/aws-amplify/amplify-category-api/tree/HEAD/packages/amplify-graphql-transformer-interfaces) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/aws-amplify/amplify-category-api/releases)
- [Changelog](https://github.com/aws-amplify/amplify-category-api/blob/main/packages/amplify-graphql-transformer-interfaces/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-category-api/commits/@aws-amplify/graphql-transformer-interfaces@2.2.4/packages/amplify-graphql-transformer-interfaces)

---
updated-dependencies:
- dependency-name: "@aws-amplify/graphql-transformer-interfaces"
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Call out for expires param when calling Storage.get(0 (#5647)

* feat(storage): supporting put api when the objectLock is enabled  (#5644)

* chore: add isObjectLockEnabled in configure

* chore: remove extra space

* chore: update wording

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

---------

Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>

* update userID code snippet for Push Notifications and Flutter (#5640)

* update userID code snippet for Push Notifications and Flutter

update userID code snippet for Push Notifications and Flutter

* Update 10_get_auth_user.mdx

* Provides recommendation to isolate Amplify workloads by account (#5650)

Co-authored-by: ⛵️ Sean Quinn <srquinn@amazon.com>

* new sample text

* fix scroll

* hiding toc entries for headings in expander

* working on scroll

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Roman Lavrenov <lavrenr@amazon.com>
Co-authored-by: Rene Brandel <renbran@amazon.com>
Co-authored-by: David McAfee <mcafd@amazon.com>
Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com>
Co-authored-by: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com>
Co-authored-by: Abdallah Shaban <awshaban@amazon.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ian Saultz <52051793+atierian@users.noreply.github.com>
Co-authored-by: Ankit Shah <22114629+ankpshah@users.noreply.github.com>
Co-authored-by: Tim Nguyen <54393192+timngyn@users.noreply.github.com>
Co-authored-by: Chris Womack <67726635+cwomack@users.noreply.github.com>
Co-authored-by: devnotfound <devendra.khanolkar@yahoo.com>
Co-authored-by: idevk <idevk@amazon.com>
Co-authored-by: Jim Eagan <84857865+hibler13@users.noreply.github.com>
Co-authored-by: kc <kylcheng@gmail.com>
Co-authored-by: Jithin Roy <51138777+royjit@users.noreply.github.com>
Co-authored-by: Tuan Pham <103537251+phantumcode@users.noreply.github.com>
Co-authored-by: jacoblogan <jacob.maiola.logan@gmail.com>
Co-authored-by: Jacob Logan <lognjc@amazon.com>
Co-authored-by: Dan Kiuna <dkkiuna@amazon.com>
Co-authored-by: Venkata Ramyasri Kota <34170013+kvramyasri7@users.noreply.github.com>
Co-authored-by: Chris F <5827964+cshfang@users.noreply.github.com>
Co-authored-by: Sean R. Quinn <srquinn21@users.noreply.github.com>
Co-authored-by: ⛵️ Sean Quinn <srquinn@amazon.com>
  • Loading branch information
25 people authored Jul 24, 2023
1 parent f1b3533 commit 66a7a87
Show file tree
Hide file tree
Showing 55 changed files with 3,352 additions and 347 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/add_deleted_assets_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Add deleted-assets label
on:
workflow_run:
workflows: ['Deleted Assets Workflow']
types: [completed]
env:
ARTIFACT_NAME: deletedAssetsArtifact
LABEL_TO_ADD: deleted-assets
jobs:
addRedirectsNeededLabel:
name: Add deleted-assets label
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
permissions:
pull-requests: write # used to add label
steps:
- name: Checkout repository to get the workflow scripts
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 https://github.com/actions/checkout/commit/c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Download artifact
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
env:
WORKSPACE: ${{ github.workspace }}
with:
script: |
const { getArtifact } = require('./.github/workflows/scripts/utilities.js');
const fs = require('fs');
const artifactName = process.env.ARTIFACT_NAME;
const workspace = process.env.WORKSPACE
getArtifact({github, context, fs, artifactName, workspace});
- name: Unzip artifact
run: unzip '${{ env.ARTIFACT_NAME }}.zip'
- name: Add redirects-needed label to PR
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { addLabelForDeletedFiles } = require('./.github/workflows/scripts/add_label_for_deleted_files.js');
const fs = require('fs');
const artifactName = process.env.ARTIFACT_NAME;
const label = process.env.LABEL_TO_ADD;
addLabelForDeletedFiles({github, context, fs, core, artifactName, label});
6 changes: 4 additions & 2 deletions .github/workflows/add_redirects_label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
types: [completed]
env:
ARTIFACT_NAME: redirectsArtifact
LABEL_TO_ADD: redirects-needed
jobs:
addRedirectsNeededLabel:
name: Add redirects-needed label
Expand Down Expand Up @@ -33,7 +34,8 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { addRedirectsNeededLabel } = require('./.github/workflows/scripts/check_for_redirects.js');
const { addLabelForDeletedFiles } = require('./.github/workflows/scripts/add_label_for_deleted_files.js');
const fs = require('fs');
const artifactName = process.env.ARTIFACT_NAME;
addRedirectsNeededLabel({github, context, fs, core, artifactName});
const label = process.env.LABEL_TO_ADD;
addLabelForDeletedFiles({github, context, fs, core, artifactName, label});
71 changes: 27 additions & 44 deletions .github/workflows/check_for_deleted_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,38 @@ name: Deleted Assets Workflow
on:
pull_request:
branches: [main]
types: [opened, synchronize, labeled]
env:
DIFF_DIRECTORIES: 'public'
ARTIFACT_NAME: 'deletedAssetsArtifact'
PATHS_TO_CHECK: 'public'
jobs:
onPrOpen:
name: Check if assets were deleted on PR opened
checkIfAssetsWereDeleted:
name: Check if assets were deleted
runs-on: ubuntu-latest
if: github.event.action == 'opened'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Minimal depth 2 so we can checkout the commit before possible merge commit.
fetch-depth: 2
- name: Checkout repository to get the workflow scripts
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 https://github.com/actions/checkout/commit/c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- name: Get count of deleted files
env:
GITHUB_PULL_REQUEST_HEAD_SHA: ${{ github.pull_request.head.sha }}
run: |
git fetch origin main
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
echo "Deleted file count: ${{ env.DELETED_FILES_ON_OPENED }}"
- name: Fail status check if there are deleted files
if: ${{ env.DELETED_FILES_ON_OPENED > 0 }}
run: exit 1
onPrSync:
name: Check if assets were deleted on PR sync
runs-on: ubuntu-latest
if: github.event.action == 'synchronize'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
id: set-deleted-files-count
with:
# Minimal depth 2 so we can checkout the commit before possible merge commit.
fetch-depth: 2
- name: Get count of deleted files from last sync
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: string
script: |
const { PATHS_TO_CHECK } = process.env;
const paths = PATHS_TO_CHECK.split(',');
const { getDeletedFilesFromPR } = require('./.github/workflows/scripts/utilities.js');
return getDeletedFilesFromPR({github, context, paths});
- name: Create artifact containing the PR number and deleted file count
env:
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
GITHUB_EVENT_AFTER: ${{ github.event.after }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
git fetch origin ${{ github.event.before }} --depth=1
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
echo "Deleted file count: ${{ env.DELETED_FILES_ON_SYNC }}"
- name: Fail status check if there are deleted files
if: ${{ env.DELETED_FILES_ON_SYNC > 0 }}
run: exit 1
failStatusCheck:
name: Fail status check if assets have not been verified
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'deleted-assets')
steps:
- name: Exit with error
run: exit 1
artifactName="${{ env.ARTIFACT_NAME }}.txt"
echo ${{ env.PR_NUMBER }} >> $artifactName
echo ${{ steps.set-deleted-files-count.outputs.result }} >> $artifactName
- name: Upload the deleted assets file to artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce
with:
name: ${{ env.ARTIFACT_NAME }}
path: '${{ env.ARTIFACT_NAME }}.txt'
retention-days: 1
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
module.exports = {
/**
* Add redirects-needed label if count of deleted files is greater than 0
* Add deleted-assets label if count of deleted files is greater than 0
*
* @param {Object} obj.artifactName - Name of artifiact file to check
* @param {Object} obj - Object parameters
* @param {String} obj.artifactName - Name of artifiact file to check
* @param {String} obj.label - Label to add to PR when deleted files are found from the specified paths
*/
addRedirectsNeededLabel: async ({
addLabelForDeletedFiles: async ({
github,
context,
fs,
core,
artifactName
artifactName,
label
}) => {
const {
payload: {
Expand Down Expand Up @@ -43,7 +46,7 @@ module.exports = {
owner: ownerLogin,
repo: repoName,
issue_number: prNumber,
labels: ['redirects-needed']
labels: [label]
});
}
} else {
Expand Down
16 changes: 0 additions & 16 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,3 @@ pull_request_rules:
- What is the target address of the redirect? (Where are you trying to redirect to?)
- Type of redirect? 301 - permanent redirect or 302 - temporary redirect? (More info on Amplify Hosting redirects here: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html)
- name: Remove verified-assets label if deleted-assets label is added
conditions:
- label="deleted-assets"
actions:
label:
remove:
- 'verified-assets'
- name: Add deleted-assets label if status checks fail
conditions:
- or:
- check-failure="Check if assets were deleted on PR opened"
- check-failure="Check if assets were deleted on PR sync"
actions:
label:
add:
- 'deleted-assets'
2 changes: 1 addition & 1 deletion amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ frontend:
- node tasks/addLastUpdatedToMdxFiles.js
build:
commands:
- echo "PROD_ENV=$PROD_ENV" >> .env.custom
- echo "BUILD_ENV=$BUILD_ENV" >> .env.custom
- NODE_ENV=production yarn build
- if [ "${AWS_BRANCH}" = "main" ]; then node tasks/build-algolia-search.mjs; fi
artifacts:
Expand Down
15 changes: 7 additions & 8 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@
"RecyclerView",
"redirect_to",
"referrerpolicy",
"refetches",
"Registrarse",
"Regístrate",
"Rehydrated",
Expand Down Expand Up @@ -1230,6 +1231,7 @@
"tabs.page.html",
"tabs.router.module",
"taglabel",
"tanstack",
"task.result",
"taskIdentifier",
"template.json",
Expand Down Expand Up @@ -1506,13 +1508,10 @@
"Libre's",
"Pinia",
"kotlinx",
"snapcraft"
"snapcraft",
"snapshotted",
"visionos"

],
"flagWords": [
"hte",
"full-stack",
"Full-stack",
"Full-Stack",
"sudo",
]
"flagWords": ["hte", "full-stack", "Full-stack", "Full-Stack", "sudo"]
}
2 changes: 1 addition & 1 deletion customHttp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ customHeaders:
- key: 'X-Content-Type-Options'
value: 'nosniff'
- key: 'Content-Security-Policy'
value: "upgrade-insecure-requests; default-src 'none'; prefetch-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-src 'self' https://www.youtube-nocookie.com https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' *.shortbread.aws.dev https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.algolia.net https://*.algolianet.com *.amazonaws.com https://aws.amazon.com/; img-src 'self' https://img.shields.io https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/; media-src 'self'; script-src 'self' https://a0.awsstatic.com/ https://d2c.aws.amazon.com/;"
value: "upgrade-insecure-requests; default-src 'none'; prefetch-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-src 'self' https://www.youtube-nocookie.com https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' *.shortbread.aws.dev https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.algolia.net https://*.algolianet.com *.amazonaws.com https://aws.amazon.com/ https://d2c-alpha.dse.marketing.aws.a2z.com https://aws-mktg-csds-alpha.integ.amazon.com/ https://alpha.d2c.marketing.aws.dev/ https://aa0.awsstatic.com/; img-src 'self' https://img.shields.io https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://alpha.d2c.marketing.aws.dev/ https://aa0.awsstatic.com/; media-src 'self'; script-src 'self' https://a0.awsstatic.com/ https://aa0.awsstatic.com/ https://alpha.d2c.marketing.aws.dev/ https://d2c.aws.amazon.com/;"
# CSP also set in _document.tsx meta tag
3 changes: 3 additions & 0 deletions generatePathMap.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ function generatePathMap(
},
'/contribute': {
page: '/contribute'
},
'/contribute/getting-started': {
page: '/contribute/getting-started'
}
},
removeChoosePages = false //this flag if set will generate a pathmap without the choose platform pages
Expand Down
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default async (phase, { defaultConfig }) => {

const nextConfig = withMDX({
env: {
PROD_ENV: process.env.PROD_ENV
BUILD_ENV: process.env.BUILD_ENV
},
pageExtensions: ['js', 'jsx', 'mdx', 'tsx', 'ts'],
typescript: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@algolia/client-search": "^4.13.0",
"@aws-amplify/amplify-cli-core": "^4.1.0",
"@aws-amplify/ui-components": "latest",
"@aws-amplify/ui-react": "^5.0.2",
"@aws-amplify/ui-react": "^5.0.4",
"@cloudscape-design/components": "^3.0.238",
"@cloudscape-design/global-styles": "^1.0.8",
"@emotion/react": "^11.1.5",
Expand Down
Loading

0 comments on commit 66a7a87

Please sign in to comment.