Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
9da6085
PWA Kit projects have Active Data tracking set to 'true' by default (…
adamraya Aug 28, 2024
d7a412a
Merge pull request #1970 from SalesforceCommerceCloud/basePaths-impl
kevinxh Aug 29, 2024
0cfde4b
Hook and updates
jeremy-jung1 Aug 30, 2024
ff446ab
Add expiry time
jeremy-jung1 Aug 30, 2024
822c4d4
add DNT tests
jeremy-jung1 Sep 3, 2024
ff3ae26
fix linting
jeremy-jung1 Sep 3, 2024
bd5c7b9
linting in test-commerce-sdk-react
jeremy-jung1 Sep 3, 2024
b87a307
Update test-commerce-sdk-react page
jeremy-jung1 Sep 3, 2024
9efdb66
linting and remove console logs
jeremy-jung1 Sep 3, 2024
099cd13
Update CHANGELOG.md
jeremy-jung1 Sep 3, 2024
544b190
Add expiresOnWindowClose
jeremy-jung1 Sep 3, 2024
61cbb16
Update wordings
jeremy-jung1 Sep 3, 2024
928dfff
Remove expiresOnBrowserClose and handle null preference
jeremy-jung1 Sep 3, 2024
675a8c8
remove comment
jeremy-jung1 Sep 3, 2024
1844528
update wording
jeremy-jung1 Sep 3, 2024
1882fd5
remove unused import
jeremy-jung1 Sep 3, 2024
2dd4ce9
Revert "@W-16442332@ Add support for environment level base path (the…
kevinxh Sep 4, 2024
da159ca
Apply feedback
jeremy-jung1 Sep 4, 2024
1fef72f
[commerce-sdk-react] Bug Fix Cookie expires time (@W-16626227@) (#1994)
adamraya Sep 4, 2024
11a0e9c
[commerce-sdk-react] Bug Fix Cookie expires time (@W-16626227@) (#199…
adamraya Sep 5, 2024
bbef447
@W-16057182: Manual workflow to setup the pwa-kit project (#1992)
unandyala Sep 5, 2024
e0ecd76
Apply feedback
jeremy-jung1 Sep 6, 2024
a4e2ec3
another test
jeremy-jung1 Sep 6, 2024
753dee5
Linting
jeremy-jung1 Sep 6, 2024
2ff0829
Feat: Update logout function to be used for guest users @W-16300903@ …
joeluong-sfcc Sep 6, 2024
e520f64
Merge pull request #1995 from SalesforceCommerceCloud/revert-1970-bas…
kevinxh Sep 6, 2024
816e4fa
Apply feedback
jeremy-jung1 Sep 9, 2024
5e63384
Remove logs
jeremy-jung1 Sep 9, 2024
24c5e91
Remove unused references
jeremy-jung1 Sep 9, 2024
79dafd0
Apply more feedback
jeremy-jung1 Sep 10, 2024
c9ac672
Move dntStatus logic into getDnt
jeremy-jung1 Sep 10, 2024
81f80e9
Apply DNT preference to `commerce-sdk-react` from `dw_dnt` (#1987)
yunakim714 Sep 11, 2024
18d3085
@W-16660178@ Small bug fixes (#2003)
vcua-mobify Sep 11, 2024
e3f3352
Merge branch 'dnt-feature-branch' into W-16567627-dnt-hook
jeremy-jung1 Sep 11, 2024
f0463ec
Apply more feedback
jeremy-jung1 Sep 11, 2024
a8e8b20
linting
jeremy-jung1 Sep 11, 2024
44208ba
linting
jeremy-jung1 Sep 11, 2024
5bf99bc
Fix heading hierachy and aria-hidden icons (#2000)
alexvuong Sep 11, 2024
9c15816
Update expires and add tests
jeremy-jung1 Sep 11, 2024
81e86fd
Add tests for both booleans
jeremy-jung1 Sep 11, 2024
897f8a0
Add comment
jeremy-jung1 Sep 11, 2024
5278203
Linting and commenting
jeremy-jung1 Sep 11, 2024
2c962a2
Merge branch 'develop' into W-16567627-dnt-hook
jeremy-jung1 Sep 11, 2024
2ce1eb1
Merge branch 'develop' into dnt-feature-branch
jeremy-jung1 Sep 11, 2024
717c420
Merge branch 'dnt-feature-branch' into W-16567627-dnt-hook
jeremy-jung1 Sep 11, 2024
45a0efc
Run changelog-check only on PR context (@W-16164410@) (#2006)
adamraya Sep 12, 2024
6192816
implement working rough draft solution
joeluong-sfcc Sep 12, 2024
4c71a4b
Keep original tests
jeremy-jung1 Sep 12, 2024
efb3b01
Add test case information to description
jeremy-jung1 Sep 12, 2024
155a5c2
Remove a comment
jeremy-jung1 Sep 12, 2024
31e80d1
add unit test
joeluong-sfcc Sep 13, 2024
50277d3
Merge branch 'develop' into ju/update-custom-mutation
joeluong-sfcc Sep 13, 2024
f23a7a6
consolidate overlapping code internal functions
joeluong-sfcc Sep 13, 2024
cb56995
update type
joeluong-sfcc Sep 13, 2024
7f1ce5a
Apply DNT preference in refershAccessToken
jeremy-jung1 Sep 13, 2024
5f8995c
Change boolean in test-commerce-sdk-react
jeremy-jung1 Sep 13, 2024
414b2c9
Update tests
jeremy-jung1 Sep 13, 2024
6cc3126
linting
jeremy-jung1 Sep 16, 2024
41fe628
Merge pull request #1989 from SalesforceCommerceCloud/W-16567627-dnt-…
jeremy-jung1 Sep 16, 2024
5efe602
Add dwsid management to commerce-sdk
shethj Sep 17, 2024
6fa5c63
Exclude dwsid from being suffixed with siteID
shethj Sep 17, 2024
a0926a2
Remove OCAPI Sessions URL from provider
shethj Sep 17, 2024
c046b62
Remove OCAPI Sessions URL from retail-app
shethj Sep 17, 2024
6b5dde5
Updated changelog for commerce-sdk
shethj Sep 17, 2024
0d2fa8f
Update retail app changelog
shethj Sep 17, 2024
277096b
Fix linting
shethj Sep 17, 2024
632afac
Fix linting
shethj Sep 17, 2024
4a1c593
Merge pull request #2011 from SalesforceCommerceCloud/feature/remove-…
shethj Sep 18, 2024
aff7ee0
@W-16564111 Shopper Context in PWA Kit (#1986)
hajinsuha1 Sep 19, 2024
0aab5de
Make UI
jeremy-jung1 Sep 19, 2024
f03fb88
Translations and some CSS
jeremy-jung1 Sep 19, 2024
0199311
Update CHANGELOG.md
jeremy-jung1 Sep 19, 2024
940fb25
Adding mobile view
jeremy-jung1 Sep 20, 2024
6169792
Bump template version
jeremy-jung1 Sep 20, 2024
38c5387
merge develop into feature branch
jeremy-jung1 Sep 20, 2024
4e0629d
Merge branch 'dnt-feature-branch' into W-16567765-dnt-ui
jeremy-jung1 Sep 20, 2024
408b397
fix typescript type
bfeister Sep 24, 2024
ff63e48
Merge branch 'develop' into ju/update-custom-mutation
bfeister Sep 24, 2024
0df602c
fix type for shortCode
joeluong-sfcc Sep 24, 2024
ce91762
Merge pull request #2008 from SalesforceCommerceCloud/ju/update-custo…
bfeister Sep 24, 2024
03c87aa
Revert "Fix: update `useCustomMutation` hook to accept body as a muta…
bfeister Sep 25, 2024
6efc287
Fix: Handle non ASCII values in headers (@W-16087847@) (#2009)
joeluong-sfcc Sep 25, 2024
c511264
Make content behind modal interactive
jeremy-jung1 Sep 25, 2024
d4e39dd
Merge branch 'develop' into revert-2008-ju/update-custom-mutation
bfeister Sep 25, 2024
14a9844
Don't revert the fix for `shortCode: config.shortCode`
bfeister Sep 25, 2024
7785e46
remove effectiveDateTime and clientIp from SHOPPER_CONTEXT_SEARCH_PAR…
hajinsuha1 Sep 25, 2024
6db979f
Merge pull request #2025 from SalesforceCommerceCloud/revert-2008-ju/…
bfeister Sep 25, 2024
3133b45
[a11y] Order Details page @W-12627200@ @W-12627104@ (#2026)
vmarta Sep 25, 2024
7abd31e
linting
jeremy-jung1 Sep 25, 2024
13fcc7d
Update use-dnt-modal.js
jeremy-jung1 Sep 25, 2024
11574ab
linting
jeremy-jung1 Sep 25, 2024
e6008d2
Updates on message
jeremy-jung1 Sep 25, 2024
afb0dd1
Fix: update useCustomMutation hook to accept body as a mutate paramet…
unandyala Sep 26, 2024
75b94ff
Extend getAppOriginto support x-forwarded-host header in a non-breaki…
alexvuong Sep 26, 2024
80bfd30
W-12627120 - Add aria-labels for buttons in product item wishlist com…
echessman Sep 26, 2024
e97d625
Fix: a11y - Focus title on toggle card open (@W-12627119@) (#2029)
joeluong-sfcc Sep 27, 2024
ba0232d
announce change in price for screen readers
bfeister Sep 27, 2024
e085526
Merge branch 'develop' into feature/W-12627127-wishlist-aria
bfeister Sep 27, 2024
674cc74
add to CHANGELOG
bfeister Sep 27, 2024
6eaf8f7
Merge branch 'feature/W-12627127-wishlist-aria' of github.com:Salesfo…
bfeister Sep 27, 2024
1a8fcac
simplify useCustomMutation implementation
kevinxh Sep 27, 2024
fbeca27
add changelog
kevinxh Sep 27, 2024
df347df
Merge pull request #2033 from SalesforceCommerceCloud/feature/W-12627…
bfeister Sep 27, 2024
04763a1
Close form when back button is pressed from SFRA
jeremy-jung1 Sep 27, 2024
8b56a92
Some updates based on feedback
jeremy-jung1 Sep 30, 2024
3ca6852
@W-16600055 Page Designer Banner displayed based on shopper context (…
hajinsuha1 Oct 1, 2024
92649a5
Add unit test for a11y bugfix
bfeister Oct 1, 2024
2d227c2
fix dupe test name, add test for previous a11y fix
bfeister Oct 1, 2024
4ca4946
revert extraneous whitespace changes
bfeister Oct 1, 2024
8adbc29
Merge pull request #2039 from SalesforceCommerceCloud/fix/failing-tes…
bfeister Oct 1, 2024
e7a096c
Fix: a11y - Add accessibility label to edit/remove buttons on account…
joeluong-sfcc Oct 1, 2024
9b7cf86
Merge branch 'develop' into improve-useCustomMutation
bfeister Oct 1, 2024
d4f4bee
Merge pull request #2034 from SalesforceCommerceCloud/improve-useCust…
bfeister Oct 1, 2024
a6d2c2f
add documentation for custom mutation hooks as well as dynamic `body`…
bfeister Oct 1, 2024
77bdb7b
Update CHANGELOG
bfeister Oct 1, 2024
ccb17bf
@W-15490276@ Better refresh token error logging for V3 (#2028)
vcua-mobify Oct 1, 2024
8ad7bc6
Improve documentation of custom parameters in example
bfeister Oct 2, 2024
b73f9bb
clarify the referenced example code with a reference link
bfeister Oct 2, 2024
80c5d1f
Merge branch 'develop' into feature/docs-for-custom-mutation/W-15887464
bfeister Oct 2, 2024
572d99c
cherry pick non-ascii runtime fix
kevinxh Oct 2, 2024
afa16b8
Merge pull request #2042 from SalesforceCommerceCloud/feature/docs-fo…
bfeister Oct 2, 2024
2c1692b
bump version to v3.7.1-preview.0
kevinxh Oct 2, 2024
1da9c72
Fix: a11y - Add accessibility label to edit/remove buttons on checkou…
joeluong-sfcc Oct 2, 2024
43edb57
remove incorrect usage of @chakra-ui/layout
kevinxh Oct 2, 2024
e1de97e
fix lint
kevinxh Oct 2, 2024
f4c2304
add changelog
kevinxh Oct 2, 2024
3854cb4
Updates after feedback
jeremy-jung1 Oct 2, 2024
75fb97f
Merge pull request #2047 from SalesforceCommerceCloud/remove-chakra-l…
kevinxh Oct 2, 2024
15f75b1
bug fix
kevinxh Oct 2, 2024
93c33b4
Update modal wording to notification
jeremy-jung1 Oct 2, 2024
f699cbb
linting
jeremy-jung1 Oct 2, 2024
d395914
Update more wording
jeremy-jung1 Oct 2, 2024
0e190a8
bump version to 3.7.1
kevinxh Oct 2, 2024
437396c
Increase bundlesize
jeremy-jung1 Oct 2, 2024
bd9557b
add retail-react-app fix changelog
kevinxh Oct 2, 2024
a416b71
bump retail-react-app
kevinxh Oct 2, 2024
a852b78
remove unnecessary change
kevinxh Oct 2, 2024
669cf44
Merge branch 'develop' into W-16567765-dnt-ui
jeremy-jung1 Oct 2, 2024
2d47150
Merge branch 'develop' into dnt-feature-branch
jeremy-jung1 Oct 2, 2024
8a5d204
Merge branch 'dnt-feature-branch' into W-16567765-dnt-ui
jeremy-jung1 Oct 2, 2024
b2ed898
revert x-forwarded-host header work (#2044)
alexvuong Oct 2, 2024
b29ccb4
Remove unused import
jeremy-jung1 Oct 2, 2024
9dde49c
Merge pull request #2045 from SalesforceCommerceCloud/prepare-v3.7.1-…
kevinxh Oct 2, 2024
f9591ce
Wording from modal to notification
jeremy-jung1 Oct 2, 2024
0399877
await updateDNT
jeremy-jung1 Oct 2, 2024
46368ff
Apply feedback
jeremy-jung1 Oct 3, 2024
65deab7
Linting
jeremy-jung1 Oct 3, 2024
cda10ba
Show form again when cookie conflict with token
jeremy-jung1 Oct 3, 2024
fc6873a
Make updateDNT async
jeremy-jung1 Oct 3, 2024
763bc98
Update CHANGELOG.md
jeremy-jung1 Oct 3, 2024
03b8373
Fix: update ssr.js to include new non ASCII encoding feature flag (#2…
joeluong-sfcc Oct 3, 2024
994ca1d
Update tests
jeremy-jung1 Oct 3, 2024
faf070d
Handle token inexistence
jeremy-jung1 Oct 4, 2024
495ee07
Remove double negative
jeremy-jung1 Oct 4, 2024
f21fa6e
Merge pull request #2017 from SalesforceCommerceCloud/W-16567765-dnt-ui
jeremy-jung1 Oct 4, 2024
886ba9c
@W-16543850 Add `authorizeCustomer` and `getPasswordResetToken` to `S…
hajinsuha1 Oct 8, 2024
6630ee1
Create use app origin hook to consume x-forwarded-host header value (…
alexvuong Oct 9, 2024
45e34aa
@W-12627216@ Mobile account menu a11y fixes (#2059)
vcua-mobify Oct 9, 2024
17519c8
@W-12627162@ A11y - PLP page filter: change p tags to header tags (#2…
vcua-mobify Oct 9, 2024
46fe9f9
Remove UI from feature branch
jeremy-jung1 Oct 10, 2024
2faf929
Update CHANGELOG.md
jeremy-jung1 Oct 10, 2024
cd1ccd6
Merge branch 'develop' into dnt-feature-branch
jeremy-jung1 Oct 10, 2024
11ec97c
remove python2
kevinxh Oct 10, 2024
0f85dfc
try python 3
kevinxh Oct 10, 2024
03e42a4
use pip3
kevinxh Oct 10, 2024
804d538
try removing python/awscli
kevinxh Oct 10, 2024
65a14bc
remove system deps
kevinxh Oct 10, 2024
cf6429b
install datadog cli
kevinxh Oct 10, 2024
20404bd
activate python env
kevinxh Oct 10, 2024
2a88d2e
install datadog
kevinxh Oct 10, 2024
6581461
move everything to datadog action filg
kevinxh Oct 10, 2024
a6eada1
Merge pull request #2070 from SalesforceCommerceCloud/fix-ci
kevinxh Oct 10, 2024
12b3f23
Merge branch 'develop' into feature/shopper-context
hajinsuha1 Oct 11, 2024
ed38eb9
Merge branch 'develop' into dnt-feature-branch
jeremy-jung1 Oct 11, 2024
b18e2b2
bump the version
kevinxh Oct 11, 2024
204cff0
Empty commit to trigger ci
kevinxh Oct 11, 2024
bb817df
Merge pull request #2073 from SalesforceCommerceCloud/bump-3.8.0-dev.1
kevinxh Oct 11, 2024
ee3e0c4
Merge branch 'develop' into dnt-feature-branch
jeremy-jung1 Oct 11, 2024
2ec5f5c
Document methods to manage hybrid cookie in commerce-sdk-react
shethj Oct 15, 2024
5ca7076
Format doc
shethj Oct 15, 2024
e46a7da
Merge pull request #2067 from SalesforceCommerceCloud/dnt-feature-branch
jeremy-jung1 Oct 15, 2024
a63f97c
Feat: Add more e2e tests (@W-16773028@) (#2061)
joeluong-sfcc Oct 15, 2024
2677b69
Merge branch 'develop' into document-auth-fns-commerce-sdk-react
shethj Oct 16, 2024
8b001d3
Merge pull request #2078 from SalesforceCommerceCloud/document-auth-f…
kevinxh Oct 16, 2024
38d1b70
@W-16778724 Optimize PLP Skeleton (#2064)
hajinsuha1 Oct 17, 2024
602a007
add waitFor after creating account (#2084)
joeluong-sfcc Oct 17, 2024
2429e5e
update changelog
hajinsuha1 Oct 17, 2024
10d88cf
Merge branch 'develop' into feature/shopper-context
hajinsuha1 Oct 17, 2024
e8492f1
Merge branch 'v5/template-retail-react-app' into feature/shopper-context
hajinsuha1 Oct 17, 2024
2303f81
@W-16778724 Disable `usePage` react hook if `shopperContext` is undef…
hajinsuha1 Oct 18, 2024
e0b81bc
TTL & TAOB changes, now GPG signed, copied from https://github.com/Sa…
bfeister Oct 18, 2024
ad16d2e
Merge pull request #2089 from SalesforceCommerceCloud/feature/ttl-tao…
bfeister Oct 18, 2024
2e0da3b
Attach dwsid to SCAPI request headers
shethj Oct 21, 2024
5ac0731
Update changelog
shethj Oct 21, 2024
7495b31
Fix linting errors
shethj Oct 21, 2024
18e4e0e
Linting fixes
shethj Oct 21, 2024
a03077a
Update pwa-create-app changelog
shethj Oct 21, 2024
f013165
addresses pr feedback, remove accessToken argument, refactor to allow…
johnnygreen Oct 21, 2024
597365e
no reason to use an any here, back to number | undefined
johnnygreen Oct 21, 2024
24eddad
Merge pull request #2091 from SalesforceCommerceCloud/feature/ttl-pr-…
bfeister Oct 21, 2024
cf678d8
Merge branch 'develop' into feature/server-affinity-cleanup
shethj Oct 22, 2024
306390c
Fix merge issues
shethj Oct 22, 2024
21a308a
Remove OCAPI proxy from config and generator templates
shethj Oct 22, 2024
21f1f7b
Update retail app changelog
shethj Oct 22, 2024
9ebee80
Remove OCAPI proxy from react-sdk
shethj Oct 22, 2024
ca0bc0b
Merge pull request #2090 from SalesforceCommerceCloud/feature/server-…
shethj Oct 22, 2024
a378859
Merge branch 'develop' into feature/retail-react-app-v5
bfeister Oct 22, 2024
fd3a4b3
Merge branch 'develop' into v5/template-retail-react-app
bfeister Oct 22, 2024
ad8682f
Merge branch 'v5/template-retail-react-app' into feature/shopper-context
bfeister Oct 22, 2024
f4ee8f5
Revert premature package.json change
bfeister Oct 22, 2024
4ed1340
Bump `build/vendor.js` ceiling
bfeister Oct 22, 2024
664d72f
Merge pull request #2072 from SalesforceCommerceCloud/feature/shopper…
bfeister Oct 22, 2024
936d88e
Merge branch 'feature/retail-react-app-v5' into v5/template-retail-re…
bfeister Oct 22, 2024
09d383a
Merge pull request #2095 from SalesforceCommerceCloud/v5/template-ret…
bfeister Oct 22, 2024
fcc76e9
Restore OCAPI proxy in config
shethj Oct 28, 2024
7fff71d
Merge pull request #2101 from SalesforceCommerceCloud/hotfix/restore-…
shethj Oct 28, 2024
17b9e0c
Fix link list to follow with a11y practise (#2098)
alexvuong Oct 28, 2024
45a4b90
Merge CHANGELOG updates from release/3.8.x + Bump package dev versions
bfeister Oct 29, 2024
822c674
merge develop
bfeister Oct 29, 2024
d6f62c3
Merge pull request #2106 from SalesforceCommerceCloud/merge-back/rele…
bfeister Oct 29, 2024
2fbb2aa
@W-16102728@ Clear other sessions on password change (#2092)
vcua-mobify Nov 13, 2024
cd1d2b3
Replace transfer basket call with merge baskets
shethj Nov 19, 2024
b975033
Update changelog
shethj Nov 19, 2024
27c9139
Update CacheUpdateMatrix for mergeBasket
shethj Nov 19, 2024
85698a0
Update changelog
shethj Nov 19, 2024
5a93347
Fix incorrect import in radio card component
shethj Nov 20, 2024
55edd29
Update PR number in checkout
shethj Nov 20, 2024
c20451b
Linting fix
shethj Nov 20, 2024
5623dfb
Update mutation test
shethj Nov 20, 2024
c059fe9
Fix spacing in changelog
shethj Nov 21, 2024
67ca23a
Merge pull request #2138 from SalesforceCommerceCloud/feature/checkou…
shethj Nov 21, 2024
1728e8d
Update CHANGELOG
bfeister Nov 23, 2024
3059c15
Revert "Update CHANGELOG"
bfeister Nov 23, 2024
ce95bdf
Merge branch 'develop' into bugfix/checkoutpage-radiobutton-render-error
shethj Nov 25, 2024
57c24e1
Merge pull request #2140 from SalesforceCommerceCloud/bugfix/checkout…
shethj Nov 25, 2024
3725c0f
Fix refresh token TTL warning firing off when no override is provided…
joeluong-sfcc Dec 10, 2024
50c0f74
@W-17062545@ Add support for non-302 redirects (#2173)
vcua-mobify Dec 17, 2024
fbc1c78
@W-17572026: Fix failing checkout test (#2195)
unandyala Jan 10, 2025
0f2fc08
Update old references to 2024
bendvc Jan 13, 2025
f9f2b05
Update CHANGELOG.md
bendvc Jan 13, 2025
66bbdbc
Merge pull request #2197 from SalesforceCommerceCloud/bendvc/update-r…
bendvc Jan 13, 2025
3ebf7c7
Allow cookies in shopper login API (#2190)
unandyala Jan 13, 2025
0797dc4
Merge branch 'develop' into bendvc/merge-develop-into-extensibility-b…
bendvc Jan 13, 2025
43d3f83
Update lock files
bendvc Jan 13, 2025
84fa9f5
Fix component imports
bendvc Jan 13, 2025
73d34a8
Lint
bendvc Jan 13, 2025
1176a84
Update some mock data
bendvc Jan 13, 2025
abef2c4
Fix tests
bendvc Jan 14, 2025
5d708ac
Bump bundle size
bendvc Jan 14, 2025
7fe3e7b
Uncomment tests
bendvc Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 15 additions & 44 deletions .github/actions/changelog-check/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: 'Changelog Check'
description: 'Check if changelog is updated for the changed packages'
inputs:
github_token:
description: 'GitHub token'
required: true
pr_number:
description: 'Pull request number'
required: true
Expand All @@ -16,39 +13,26 @@ runs:
with:
fetch-depth: 0 # Fetch full history to access all commits

- name: Get Base Branch SHA
id: get_base_sha
- name: Determine Base SHA and Merge Base
id: determine_base
run: |
if [ -n "${{ inputs.pr_number }}" ]; then
BASE_SHA=$(curl -s -H "Authorization: token ${{ inputs.github_token }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ inputs.pr_number }}" | \
jq -r '.base.sha')
if [ -n "${{ github.event.pull_request.base.sha }}" ]; then
BASE_SHA="${{ github.event.pull_request.base.sha }}"
MERGE_BASE=$(git merge-base $BASE_SHA ${{ github.sha }})
echo "BASE_SHA=$BASE_SHA" >> $GITHUB_ENV
echo "MERGE_BASE=$MERGE_BASE" >> $GITHUB_ENV
else
echo "Not running in a PR context. Skipping changelog check."
echo "SKIP_CHANGELOG_CHECK=true" >> $GITHUB_ENV
fi

if [ -z "$BASE_SHA" ] || [ "$BASE_SHA" == "null" ]; then
echo "Unable to fetch base SHA or no base SHA available. Skipping changelog check."
echo "Not running in a PR context or unable to determine base SHA. Skipping changelog check."
echo "SKIP_CHANGELOG_CHECK=true" >> $GITHUB_ENV
else
echo "BASE_SHA=${BASE_SHA}" >> $GITHUB_ENV
fi
shell: bash

- name: Find merge base
id: find_merge_base
- name: Check if 'skip changelog' label is present
id: check_labels
run: |
if [ -n "${{ env.BASE_SHA }}" ] && [ "${{ env.BASE_SHA }}" != "null" ]; then
MERGE_BASE=$(git merge-base ${{ env.BASE_SHA }} ${{ github.sha }})
if [ -z "$MERGE_BASE" ]; then
echo "Unable to find merge base. Skipping changelog check."
echo "SKIP_CHANGELOG_CHECK=true" >> $GITHUB_ENV
else
echo "MERGE_BASE=${MERGE_BASE}" >> $GITHUB_ENV
fi
else
echo "Unable to make the merge base calculation due to missing or null BASE_SHA. Skipping changelog check."
SKIP_CHANGELOG_LABEL="${{ contains(github.event.pull_request.labels.*.name, 'skip changelog') }}"
if [ "$SKIP_CHANGELOG_LABEL" = "true" ]; then
echo "Skip changelog label is present. Skipping changelog check."
echo "SKIP_CHANGELOG_CHECK=true" >> $GITHUB_ENV
fi
shell: bash
Expand All @@ -58,20 +42,7 @@ runs:
echo "Base SHA: ${{ env.BASE_SHA }}"
echo "Current SHA: ${{ github.sha }}"
echo "Merge Base: ${{ env.MERGE_BASE }}"
shell: bash

- name: Fetch PR labels and check for skip changelog
id: fetch_and_check_labels
run: |
PR_LABELS=$(curl -s -H "Authorization: token ${{ inputs.github_token }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ inputs.pr_number }}/labels" | \
jq -r '.[].name | @sh' | tr '\n' ' ')
echo "PR_LABELS=${PR_LABELS}" >> $GITHUB_ENV

if echo "${PR_LABELS}" | grep -q "'skip changelog'"; then
echo "Skip changelog label is present. Skipping changelog check."
echo "SKIP_CHANGELOG_CHECK=true" >> $GITHUB_ENV
fi
echo "SKIP_CHANGELOG_CHECK: ${{ env.SKIP_CHANGELOG_CHECK }}"
shell: bash

- name: Check if changelog is updated
Expand All @@ -87,7 +58,7 @@ runs:
PUBLIC_PACKAGES=("commerce-sdk-react" "pwa-kit-create-app" "pwa-kit-dev" "pwa-kit-react-sdk" "pwa-kit-runtime" "template-retail-react-app")

for PACKAGE in "${PUBLIC_PACKAGES[@]}"; do
if echo "$CHANGED_FILES" | grep -i "^packages/$PACKAGE/"; then
if echo "$CHANGED_FILES" | grep -iq "^packages/$PACKAGE/"; then
if ! echo "$CHANGED_FILES" | grep -iq "^packages/$PACKAGE/CHANGELOG.md"; then
echo "CHANGELOG.md was not updated for package $PACKAGE. Please update the CHANGELOG.md or add 'skip changelog' label to the PR."
exit 1
Expand Down
108 changes: 108 additions & 0 deletions .github/actions/create_mrt_target/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: create_mrt_target
description: Create MRT Environment
inputs:
project_id:
description: "MRT Project ID"
target_id:
description: "MRT Target ID"
proxy_configs:
description: "Proxy Configs"
mobify_api_key:
description: "Mobify user API key"

runs:
using: composite
steps:
- name: Initialize
id: initialize
shell: bash
run: |
set -e
echo "TARGET_API_BASE_URL=https://cloud.mobify.com/api/projects/${{ inputs.project_id }}/target" >> $GITHUB_ENV

- name: Get target
id: get_target
shell: bash
run: |-
set -e
response=$(curl --location --silent --show-error --write-out "HTTPSTATUS:%{http_code}" "$TARGET_API_BASE_URL/${{ inputs.target_id }}" \
--header "Authorization: Bearer ${{ inputs.mobify_api_key }}")

http_status=$(echo $response | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
echo "status=$http_status" >> $GITHUB_OUTPUT

if [ "$http_status" -eq 404 ]; then
echo "MRT environment not found, it will be created in the next step."
elif [ "$http_status" -eq 200 ]; then
echo "MRT environment already exists."
else
echo "Error: Unexpected HTTP status: $http_status"
exit 1
fi

- name: Create target
id: create_target
if: ${{ steps.get_target.outputs.status == '404' }}
shell: bash
run: |-
set -e
proxy_config_json=$(echo ${{ inputs.proxy_configs }} | jq -r .)
response=$(curl --location --silent --show-error --write-out "HTTPSTATUS:%{http_code}" "$TARGET_API_BASE_URL/" \
--header "Authorization: Bearer ${{ inputs.mobify_api_key }}" \
--header "Content-Type: application/json" \
--data "$(jq -n \
--arg name "${{ inputs.target_id }}" \
--arg slug "${{ inputs.target_id }}" \
--argjson ssr_proxy_configs "$proxy_config_json" \
'{name: $name, slug: $slug, ssr_proxy_configs: $ssr_proxy_configs}')")

http_status=$(echo "$response" | sed -n 's/.*HTTPSTATUS://p')
response_body=$(echo "$response" | sed -e 's/HTTPSTATUS:.*//g')

echo "status=$http_status" >> $GITHUB_OUTPUT

if [ "$http_status" -ne 201 ]; then
echo "Request failed with status code $http_status"
echo "Response Body: $response_body"
exit 1
fi

- name: Wait for target to be active
id: wait_for_target
if: ${{ steps.create_target.outputs.status == '201' }}
shell: bash
run: |-
set -e
max_attempts=30
sleep_duration=30
attempts=0

while [ $attempts -lt $max_attempts ]; do
response=$(curl --location --silent --show-error --write-out "HTTPSTATUS:%{http_code}" "$TARGET_API_BASE_URL/${{ inputs.target_id }}" \
--header "Authorization: Bearer ${{ inputs.mobify_api_key }}")

http_status=$(echo $response | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
response_body=$(echo $response | sed -e 's/HTTPSTATUS\:.*//g')

if [ "$http_status" -ne 200 ]; then
echo "Request failed with status code $http_status"
exit 1
fi

current_state=$(echo $response_body | jq -r '.state')

if [ "$current_state" == "ACTIVE" ]; then
echo "Target is now ACTIVE."
exit 0
elif [ "$current_state" != "CREATE_IN_PROGRESS" ]; then
echo "Unexpected target state: $current_state."
exit 1
fi

attempts=$((attempts + 1))
echo "Waiting for target to be ACTIVE. Attempt $attempts/$max_attempts."
sleep $sleep_duration
done

echo "Target did not become active within the expected time."
exit 1
50 changes: 50 additions & 0 deletions .github/actions/deploy_app/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: deploy_app
description: Deploy application to MRT
inputs:
project_id:
description: MRT Project ID
target_id:
description: MRT Target ID
project_dir:
description: Project Directory
mobify_user:
description: "Mobify user email"
mobify_api_key:
description: "Mobify user API key"
runs:
using: composite
steps:
- name: Create MRT credentials file
id: create_mrt_credentials
uses: "./.github/actions/create_mrt"
with:
mobify_user: ${{ inputs.mobify_user }}
mobify_api_key: ${{ inputs.mobify_api_key }}

- name: Read application config
id: read_config
shell: bash
run: |
# Read proxy configs from the default config file using Node.js
config=$(node -e "console.log(JSON.stringify(require('${{ inputs.project_dir }}/config/default.js')))")
# Extract proxyConfigs as a JSON string
echo "proxy_configs=$(echo "$config" | jq -c '.ssrParameters.proxyConfigs' | jq @json)" >> $GITHUB_OUTPUT


- name: Create MRT target
id: create_mrt_target
uses: "./.github/actions/create_mrt_target"
with:
project_id: ${{ inputs.project_id }}
target_id: ${{ inputs.target_id }}
proxy_configs: ${{ steps.read_config.outputs.proxy_configs }}
mobify_api_key: ${{ inputs.mobify_api_key }}


- name: Push bundle to MRT
id: push_bundle
uses: "./.github/actions/push_to_mrt"
with:
CWD: ${{ inputs.project_dir }}
TARGET: ${{ inputs.target_id }}
FLAGS: --wait
2 changes: 1 addition & 1 deletion .github/actions/e2e_generate_app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ runs:
using: composite
steps:
- name: Generate new project based on project-key
run: node e2e/scripts/generate-project.js ${{ inputs.PROJECT_KEY }}
run: node e2e/scripts/generate-project.js --project-key ${{ inputs.PROJECT_KEY }}
shell: bash
118 changes: 118 additions & 0 deletions .github/actions/generate_app/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: generate_app
description: Generate Application
inputs:
use_extensibility:
description: Use Extensibility?
project_id:
description: Project ID
instance_url:
description: Instance Url
org_id:
description: Org Id
short_code:
description: Short Code
client_id:
description: Client Id
site_id:
description: Site Id
is_private_client:
description: Is Private Client?
setup_hybrid:
description: Setup Phased Headless rollout?
project_dir:
description: Project Directory

runs:
using: composite
steps:
- name: Parse input values
id: parse_input
shell: bash
run: |
use_extensibility_input="${{ inputs.use_extensibility }}"
if [ "use_extensibility_input" = "true" ]; then
use_extensibility_value=2
else
use_extensibility_value=1
fi
echo "USE_EXTENSIBILITY_VALUE=$use_extensibility_value" >> $GITHUB_ENV

is_private_client_input="${{ inputs.is_private_client }}"
if [ "$is_private_client_input" = "true" ]; then
is_private_client_value=1
else
is_private_client_value=2
fi
echo "IS_PRIVATE_CLIENT_VALUE=$is_private_client_value" >> $GITHUB_ENV

setup_hybrid_input="${{ inputs.setup_hybrid }}"
if [ "$setup_hybrid_input" = "true" ]; then
setup_hybrid_value=2
else
setup_hybrid_value=1
fi
echo "SETUP_HYBRID_VALUE=$setup_hybrid_value" >> $GITHUB_ENV

- name: Build project generator inputs
id: build_generator_inputs
shell: bash
run: |
echo '{
"projectDir":"${{ inputs.project_dir }}",
"responses": [
{
"expectedPrompt": "Choose a project preset to get started:",
"response": "1\n"
},
{
"expectedPrompt": "Do you wish to use template extensibility?",
"response": "${{ env.USE_EXTENSIBILITY_VALUE }}\n"
},
{
"expectedPrompt": "What is the name of your Project?",
"response": "${{ inputs.project_id }}\n"
},
{
"expectedPrompt": "What is the URL for your Commerce Cloud instance?",
"response": "${{ inputs.instance_url }}\n"
},
{
"expectedPrompt": "What is your SLAS Client ID?",
"response": "${{ inputs.client_id }}\n"
},
{
"expectedPrompt": "Is your SLAS client private?",
"response":"${{ env.IS_PRIVATE_CLIENT_VALUE }}\n"
},
{
"expectedPrompt": "What is your Site ID in Business Manager?",
"response": "${{ inputs.site_id }}\n"
},
{
"expectedPrompt": "What is your Commerce API organization ID in Business Manager?",
"response": "${{ inputs.org_id }}\n"
},
{
"expectedPrompt": "What is your Commerce API short code in Business Manager?",
"response": "${{ inputs.short_code }}\n"
},
{
"expectedPrompt": "Do you wish to set up a phased headless rollout?",
"response": "${{ env.SETUP_HYBRID_VALUE }}\n"
}
] }' > generator-responses.json

- name: Generate project
id: generate_project
run: |
cat generator-responses.json
node e2e/scripts/generate-project.js --project-config "$(jq -c . generator-responses.json)"
shell: bash

- name: Build generated project
id: build_generated_project
working-directory: ../generated-projects/${{ inputs.project_dir }}
run: |-
npm ci
npm run build
shell: bash
Loading