Skip to content

Commit

Permalink
chore: update theme regex (#2425)
Browse files Browse the repository at this point in the history
Updated regex, and made it look for the correct text..
  • Loading branch information
Barsnes authored and mimarz committed Feb 21, 2025
1 parent 7967191 commit a1bcc83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/preview-storefront.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ jobs:
id: regex-storybook
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '📖 \[Storybook\]\((https:\/\/[^)]+)\) `[^`]+`'
regex: '\[Storybook\]\((https:\/\/[^)]+)\) `[^`]+`'

- name: Find Theme deployment
uses: actions-ecosystem/action-regex-match@v2
id: regex-theme
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '\[Theme\]\((https:\/\/[^)]+)\) `[^`]+`'
regex: '\[Theme\]\((https:\/\/[^)]+)\)'

- name: Get current time in CEST
uses: josStorer/get-current-time@v2
Expand All @@ -88,6 +88,6 @@ jobs:
${{ steps.regex-storybook.outputs.match }}
🖥 [Storefront](https://storefront-pr-${{ env.PR_NUMBER }}.dev.designsystemet.no) `${{ steps.current-time.outputs.formattedTime }} (Norwegian time)`
[Storefront](https://storefront-pr-${{ env.PR_NUMBER }}.dev.designsystemet.no) `${{ steps.current-time.outputs.formattedTime }} (Norwegian time)`
${{ steps.regex-theme.outputs.match }}
8 changes: 4 additions & 4 deletions .github/workflows/preview-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ jobs:
- run: echo ${{ steps.fc.outputs.comment-id }}
if: success() && env.PR_NUMBER

- name: Find Storybook deployment
- name: Find Storefront deployment
uses: actions-ecosystem/action-regex-match@v2
id: regex-storefront
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '🖥 \[Storefront\]\((https:\/\/[^)]+)\) `[^`]+`'
regex: '\[Storefront\]\((https:\/\/[^)]+)\) `[^`]+`'

- name: Find Theme deployment
uses: actions-ecosystem/action-regex-match@v2
id: regex-theme
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '\[Theme\]\((https:\/\/[^)]+)\) `[^`]+`'
regex: '\[Theme\]\((https:\/\/[^)]+)\)'

- name: Get current time in CEST
uses: josStorer/get-current-time@v2
Expand All @@ -88,7 +88,7 @@ jobs:
body: |
**Preview deployments for this pull request:**
📖 [Storybook](https://storybook-pr-${{ env.PR_NUMBER }}.dev.designsystemet.no) `${{ steps.current-time.outputs.formattedTime }} (Norwegian time)`
[Storybook](https://storybook-pr-${{ env.PR_NUMBER }}.dev.designsystemet.no) `${{ steps.current-time.outputs.formattedTime }} (Norwegian time)`
${{ steps.regex-storefront.outputs.match }}
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/preview-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
with:
issue-number: ${{ env.PR_NUMBER }}
body-includes: |
## Preview deployments
**Preview deployments for this pull request:**
- run: echo ${{ steps.fc.outputs.comment-id }}
if: success() && env.PR_NUMBER
Expand All @@ -60,21 +60,14 @@ jobs:
id: regex-storybook
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '📖 \[Storybook\]\((https:\/\/[^)]+)\) `[^`]+`'
regex: '\[Storybook\]\((https:\/\/[^)]+)\) `[^`]+`'

- name: Find Storefront deployment
uses: actions-ecosystem/action-regex-match@v2
id: regex-storefront
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '🖥 \[Storefront\]\((https:\/\/[^)]+)\) `[^`]+`'

- name: Find Theme deployment
uses: actions-ecosystem/action-regex-match@v2
id: regex-theme
with:
text: ${{ steps.fc.outputs.comment-body }}
regex: '\[Theme\]\((https:\/\/[^)]+)\) `[^`]+`'
regex: '\[Storefront\]\((https:\/\/[^)]+)\) `[^`]+`'

- name: Get current time in CEST
uses: josStorer/get-current-time@v2
Expand Down

0 comments on commit a1bcc83

Please sign in to comment.