Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflow to validate redirects #7726

Merged
merged 7 commits into from
Jul 3, 2024
Merged

add workflow to validate redirects #7726

merged 7 commits into from
Jul 3, 2024

Conversation

katiegoines
Copy link
Contributor

@katiegoines katiegoines commented Jun 7, 2024

Description of changes:

Added a workflow to validate the redirects.json file. When it fails, the failure appears as:
Screenshot 2024-06-10 at 12 45 35 PM

Related GitHub issue #, if available:

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • JS
  • Swift
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • Does this PR conform to the styleguide?

  • Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • Are any files being deleted with this PR? If so, have the needed redirects been created?

  • Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@katiegoines katiegoines requested a review from a team as a code owner June 7, 2024 20:55
const { invalidRedirects } = require('./.github/workflows/scripts/validate-redirects.js');
return await invalidRedirects();
- name: Fail if any invalid redirects have been found
if: ${{ steps.redirects.outputs.result }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like the previous step will always return at least the empty error array, will this only fail if no errors are found or is this going to always fail because of the empty array?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only fails if no errors are found. Just double confirmed it on my forked branch.

Copy link
Contributor

@hbuchel hbuchel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@katiegoines katiegoines merged commit 6c697ee into main Jul 3, 2024
12 checks passed
@katiegoines katiegoines deleted the redirects-validation branch July 3, 2024 15:35
dbanksdesign added a commit that referenced this pull request Jul 30, 2024
* Update versions.ts Android Amplify V2.19.1 (#7767)

* chore(flutter): update android section of Amplify Flutter getting started guide (#7760)

* chore: update android section of Flutter getting started guide

* chore: update gen 2 flutter platform setup

* chore: add info to enable network permissions on android

* chore: update H3 headers to H2

* chore: update min Xcode version to 15

* chore: update xcode verison to 15.0 for macOS

* chore: update ios and macos setup to be consistent with Android, add callout for missing podfile

* update mobile quickstarts with link to fullstack branch deployment guide #7741 (#7746)

* chore: add serverComponentsExternalPackages callout for Next.js (#7757)

* chore: add serverComponentsExternalPackages callout for Next.js

* Apply suggestions from code review

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* Apply suggestions from code review

* Update src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>

* Update src/pages/gen1/[platform]/build-a-backend/server-side-rendering/nextjs/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/[platform]/build-a-backend/server-side-rendering/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

---------

Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: josef <josef.aidt@gmail.com>

* add warning callout to gen1 backend-config (#7773)

* Revert "chore: add region to scrollable table (#7744)" (#7784)

This reverts commit 67496c5.

* chore: change outputs to amplifyConfig in flutter gen 2 docs (#7764)

* chore: change outputs to amplifyConfig in flutter gen 2 docs

* chore: change amplifyconfiguration.dart import to amplify_outputs.dart

* chore: remove --outputs-version 0 and downgrade config file callout

* chore: remove --outputs-version 0 from snippets

* chore: remove gen 2 config conversion callout

* chore: remove amplifyconfiguration.dart references from gen 2

* fix: heading order on gen1/prev subscribe-data page (#7790)

* add warning regarding subscription and mutation redaction of relational fields (#7768)

* add warning regarding subscription and mutation redaction of relational fields

* replace authn with authz in warning

* chore(api): Callout for field redaction on Swift Android relational models

* Update src/pages/gen1/[platform]/build-a-backend/graphqlapi/relational-models/index.mdx

* add feature flag to warning for gen 1

* Fix heading order in fragments affecting this page

* add protected redaction message components

* Add tests for redaction message Gen 1 and Gen 2 components

* add snapshots for redaction Gen 1 and Gen 2 component tests

* Adds ProtectedRedactionMessage components for Gen 1 and Gen2

* Render ProtectedRedactionGen1Message component on Gen 1 realtime page

* Render ProtectedRedactionGen1Message component on Gen 2 data modeling page

* Render ProtectedRedactionGen2Message component on Gen 2 realtime page

* Render ProtectedRedactionGen1Message component on Gen 1 data modeling page

* Render ProtectedRedactionGen1Message component on Gen 1 V5 realtime page

* add subscriptionsInheritPrimaryAuth as a feature flag

* correct version for subscriptionsInheritPrimaryAuth

* remove commented code

* fix heading order

---------

Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
Co-authored-by: Heather <hbuchel@gmail.com>
Co-authored-by: katiegoines <katiegoines@gmail.com>

* fix subscriptionsInheritPrimaryAuth default value (#7795)

* change overview card titles from p to h2 (#7780)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* remove conditional in aria-describedby={codeId} for MDXCopyCodeButton (#7779)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* Update index.mdx to fix typo (#7798)

Removed mention of create-vite-app

* add workflow to validate redirects (#7726)

* add workflow to validate redirects

* change filename

* removing testing errors

* finding all invalid redirects

* running validation to catch all issues

* remove unneeded code

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* update set up function guide with data example (#7759)

* update set up function guide with data example

* add mobile snippets

* remove checkboxes and circle (#7783)

* fix: heading order (#7803)

* restore autoSignIn section for SignIn page, and Switching Authentication Flows page for js categories (#7769)

Co-authored-by: JoonWon Choi <joonwonc@amazon.com>

* replace `amplify` to `ampx` (#7804)

* feat(js): list api subpathStrategy parameter (#7794)

* feat(js): list api subpathStrategy parameter

* fix: adds style guide suggestions

* fix: adds result structure

* fix: tried to delineate between recursive exploration of entire path and subpathStrategy option

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com>

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* comments and prettier

* undid prettier table change

* Update src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

---------

Co-authored-by: haverchuck <dnnoyes@amazon.com>
Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>
Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com>
Co-authored-by: josef <josef.aidt@gmail.com>

* chore: update domains for proxy (#7808)

* fix: typo on client code generation page (#7809)

* Fix anchor link, add some scroll margin to h4 headings (#7810)

* chore(deps): bump @aws-amplify/amplify-cli-core from 4.3.8 to 4.3.9 (#7788)

Bumps [@aws-amplify/amplify-cli-core](https://github.com/aws-amplify/amplify-cli/tree/HEAD/packages/amplify-cli-core) from 4.3.8 to 4.3.9.
- [Release notes](https://github.com/aws-amplify/amplify-cli/releases)
- [Changelog](https://github.com/aws-amplify/amplify-cli/blob/dev/packages/amplify-cli-core/CHANGELOG.md)
- [Commits](https://github.com/aws-amplify/amplify-cli/commits/@aws-amplify/amplify-cli-core@4.3.9/packages/amplify-cli-core)

---
updated-dependencies:
- dependency-name: "@aws-amplify/amplify-cli-core"
  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>

* chore(deps): bump aws-actions/aws-secretsmanager-get-secrets (#7792)

Bumps [aws-actions/aws-secretsmanager-get-secrets](https://github.com/aws-actions/aws-secretsmanager-get-secrets) from 2.0.3 to 2.0.5.
- [Release notes](https://github.com/aws-actions/aws-secretsmanager-get-secrets/releases)
- [Commits](aws-actions/aws-secretsmanager-get-secrets@ff26a0a...98c2d6b)

---
updated-dependencies:
- dependency-name: aws-actions/aws-secretsmanager-get-secrets
  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>

* storage(android): update getURL options (#7736)

* storage(android): update getURL options

* add more code examples

* Add Gen 2 SDL docs (#7793)

* add gen 2 SDL docs

* Update src/pages/[platform]/build-a-backend/data/data-modeling/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/[platform]/build-a-backend/data/data-modeling/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* move support callout to migration page

* update doc to state ddb-backed sources only

* made updates to the sdl explanation

---------

Co-authored-by: josef <josef.aidt@gmail.com>
Co-authored-by: Nikhil Swaminathan <nikhil@live.ca>

* Cbonif/add-non-model-auth-section (#7817)

* add callout for sql custom query/mutation return types with example

* Merge branch 'main' of github.com:aws-amplify/docs

* revert sql page change

* revert change on gen 1 sql page

* add auth permissions (#7796)

* add auth permissions

* fix accessibility error

* fix heading

* callout for mysql/postgres custom query return types (#7813)

* add callout for sql custom query/mutation return types with example

* add gen 1 example

* shorten gen 2 example a bit

* remove line breaks from gen 1 example

* remove line break

* Update index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* Update src/pages/gen1/[platform]/build-a-backend/graphqlapi/connect-api-to-existing-database/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

* remove ts import from bottom of page

---------

Co-authored-by: josef <josef.aidt@gmail.com>

* Clarify Manual Loading of Environment Variables in Sandbox Environments (#7822)

* Clarify Manual Loading of Environment Variables in Sandbox Environments

* Update src/pages/[platform]/deploy-and-host/fullstack-branching/secrets-and-vars/index.mdx

Co-authored-by: josef <josef.aidt@gmail.com>

---------

Co-authored-by: josef <josef.aidt@gmail.com>

* fix data env name in function example, ref #7825 (#7826)

* Update app id reference for CI/CD deployments (#7832)

* fix(swift): updated concurrency in quickstart (#7828)

* chore(android): Update versions.ts - Android SDK 2.76.0(#7833)

* feat(Swift): Adding SubpathStrategy documentation for Storage.List (#7831)

* Add Gen1 banner to getting started pages (#7839)

* add Gen1 Banner to all gen 1 getting started pages

* update link location and add banner to how amplify works

---------

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

* remove temporary disabling of copy-code button (#7835)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* add streaming function logs docs (#7841)

* add streaming function logs docs

* Update src/pages/[platform]/build-a-backend/functions/streaming-logs/index.mdx

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* rm multiline log callout, added note for chaining --out-file

* clarify log output in terminal where sandbox is running

---------

Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>

* a11y-when closing accordion from bottom, focus back on summary element (#7837)

* when closing accordion from bottom, focus back on summary element

* add test

* remove extra spaces

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* a11y-remove alt text for decorative image (#7836)

* remove alt text for decorative image

* mark images as decorative

---------

Co-authored-by: katiegoines <katiegoines@gmail.com>

* Update index.mdx (#7840)

* put feedback responses in aria-live (#7844)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* when clicking on toc entry, focus on respective heading in content (#7845)

Co-authored-by: katiegoines <katiegoines@gmail.com>

* add scheduling functions docs (#7842)

* add scheduling functions docs

* fix path

* Update src/pages/[platform]/build-a-backend/functions/scheduling-functions/index.mdx

* add docs for auth custom attribute support (#7846)

* add docs for auth custom attribute support

* Update src/pages/[platform]/build-a-backend/auth/concepts/user-attributes/index.mdx

* correct heading order

* fix broken links

* add mobile platform to concepts page for user attributes

* remove studio reference in Amplify Gen 2 docs (#7860)

* storage(android): update storage list with delimiter support (#7830)

* feat(Swift): Adding SubpathStrategy documentation for Storage.List

* storage(android): update storage list with delimiter support

* feat(Swift): Adding SubpathStrategy documentation for Storage.List

* chore: resolve review comments

* chore: update per review comments

* chore: resolve review comments

* fix exclude subpath sample

---------

Co-authored-by: Sebastian Villena <97059974+ruisebas@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Michael Law <1365977+lawmicha@users.noreply.github.com>
Co-authored-by: Jordan Nelson <nejrd@amazon.com>
Co-authored-by: josef <josef.aidt@gmail.com>
Co-authored-by: Hui Zhao <10602282+HuiSF@users.noreply.github.com>
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
Co-authored-by: Heather Buchel <hbuchel@gmail.com>
Co-authored-by: Kha Truong <64438356+khatruong2009@users.noreply.github.com>
Co-authored-by: Chris Bonifacio <christopher.bonifacio@gmail.com>
Co-authored-by: katiegoines <katiegoines@gmail.com>
Co-authored-by: Dane Pilcher <dppilche@amazon.com>
Co-authored-by: Katie Goines <30757403+katiegoines@users.noreply.github.com>
Co-authored-by: Nikhil Swaminathan <2429410+swaminator@users.noreply.github.com>
Co-authored-by: Kethan sai <ykethan@amazon.com>
Co-authored-by: Joon Choi <requiemdeciel@gmail.com>
Co-authored-by: JoonWon Choi <joonwonc@amazon.com>
Co-authored-by: MURAKAMI Masahiko <fossamagna2@gmail.com>
Co-authored-by: Dustin Noyes <dustin.noyes.dev@gmail.com>
Co-authored-by: haverchuck <dnnoyes@amazon.com>
Co-authored-by: Harshita Daddala <harshita.d11@gmail.com>
Co-authored-by: ashika112 <155593080+ashika112@users.noreply.github.com>
Co-authored-by: MJ Zhang <0618@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tuan Pham <103537251+phantumcode@users.noreply.github.com>
Co-authored-by: Nikhil Swaminathan <nikhil@live.ca>
Co-authored-by: Kazuki Hamasaki <ne.vivam.si.abis@gmail.com>
Co-authored-by: Jay Raval <jay.ambrish.raval@gmail.com>
Co-authored-by: Sébastien Stormacq <sebastien.stormacq@gmail.com>
Co-authored-by: Sebastian Villena <97059974+ruisebas@users.noreply.github.com>
Co-authored-by: jacoblogan <jacob.maiola.logan@gmail.com>
Co-authored-by: Jacob Logan <lognjc@amazon.com>
Co-authored-by: Amplifiyer <51211245+Amplifiyer@users.noreply.github.com>
Co-authored-by: taka <106423245+takaya-okamoto@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants