Skip to content

Commit

Permalink
Add ONBOARDING_USER_JOINED_DATE_THRESHOLD to wokflows (#5290)
Browse files Browse the repository at this point in the history
* Add ONBOARDING_USER_JOINED_DATE_THRESHOLD to wokflows

* Update fallback date

* Add changeset

* Update .changeset/early-toes-occur.md

Co-authored-by: Mikail <[email protected]>

---------

Co-authored-by: Mikail <[email protected]>
  • Loading branch information
poulch and NyanKiyoshi authored Nov 29, 2024
1 parent c925f1a commit 4add531
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-toes-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Add environment variables to GitHub Workflow to control when to show onboarding for new users
1 change: 1 addition & 0 deletions .github/workflows/deploy-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
IS_CLOUD_INSTANCE: true
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.CLOUD_ONBOARDING_USER_JOINED_DATE_THRESHOLD }}
steps:
- name: Check region
if: ${{ !contains(fromJSON('["eu", "us"]'), env.REGION) }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
APPS_MARKETPLACE_API_URL: "https://apps.staging.saleor.io/api/v2/saleor-apps"
ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.DEV_ONBOARDING_USER_JOINED_DATE_THRESHOLD }}
IS_CLOUD_INSTANCE: true
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-master-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
IS_CLOUD_INSTANCE: true
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.STAGING_ONBOARDING_USER_JOINED_DATE_THRESHOLD }}
steps:
- uses: actions/checkout@v2
- name: Set custom version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-staging-and-prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
IS_CLOUD_INSTANCE: true
POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }}
POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }}
ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.STAGING_ONBOARDING_USER_JOINED_DATE_THRESHOLD }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
APP_MOUNT_URI: /
STATIC_URL: /
IS_CLOUD_INSTANCE: true
ONBOARDING_USER_JOINED_DATE_THRESHOLD: ${{ vars.STAGING_ONBOARDING_USER_JOINED_DATE_THRESHOLD }}
run: npm run build

- name: Configure AWS credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import moment from "moment";

export const useNewUserCheck = () => {
const { user } = useUser();
const thresholdDateString = process.env.ONBOARDING_USER_JOINED_DATE_THRESHOLD || "2024-01-01";
const thresholdDateString = process.env.ONBOARDING_USER_JOINED_DATE_THRESHOLD || "2024-11-29";

if (!user) {
return {
Expand Down

0 comments on commit 4add531

Please sign in to comment.