Skip to content

Commit

Permalink
Upstream/20220706 (#4)
Browse files Browse the repository at this point in the history
* New Crowdin translations by Github Action (calcom#3078)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Change throw 500 to 204 no content (calcom#3089)

* Stops users who are not in getting the "Requires confirmation" email (calcom#3084)

* Update Email

* Remove console.debug

* Remove redundant assignment

Co-authored-by: Omar López <zomars@me.com>

* Update apps/web/pages/api/book/confirm.ts

* Fix E2E test

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* New Crowdin translations by Github Action (calcom#3088)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by Github Action (calcom#3094)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Fixes 404 for trial users

* Comments

* Less restrictive zod object parsing (calcom#3095)

* Less restrictive zod object parsing

* Remove logs

* As Google Meet is always installed, this fixes the doubling (calcom#3093)

* As Google Meet is always installed, this fixes the doubling

* Make entire Google link clickable, fix extraData

* Attempt at type fixing :)

* AdditionalInformation for the booking page?

* Update packages/emails/src/components/LocationInfo.tsx

Being explicit :)

* Exclude AdditionalInformation as it is irrelevant here

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>

* Adding Close.com library for console (calcom#3099)

* fixed month buttons on darkmode (calcom#3103)

* New Crowdin translations by Github Action (calcom#3097)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* New Crowdin translations by Github Action (calcom#3104)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Add NEXTAUTH_URL to app.json to address heroku deploy failure (calcom#3091)

* Feature/parallel booking availability (calcom#3087)

* Update tailwind to 3.1.3 (calcom#3106)

* New Crowdin translations by Github Action (calcom#3107)

* Fix weekStart passThrough + allow all days (calcom#3108)

* Cast to boolean fix, thought we had them all (calcom#3111)

* includedDates would always disable excludedDates due to empty array (calcom#3112)

* Fix ux (calcom#3113)

* New Crowdin translations by Github Action (calcom#3109)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Cutting down calls for installed apps + other UI tweaks (calcom#3052)

* Cutting down calls for installed apps

* Fixing onboarding

* Reverting and invalidating more specifically

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* When deleting video app, change locations to Cal Video (calcom#3022)

* tRPC endpoint to delete credentials

* Replace deleted app with daily

* Updated Jitisi logo

* Update logo size

* Update logo size

* Fix type error

* Remove type as prop

* Add isPrismaArray to lib

* Address feedback

* Remove connect calednar

* Expire payment sessions and cancel payment intent

* Expire payment sessions and cancel payment intent

* Refactor input

Co-authored-by: Omar López <zomars@me.com>

* Remove console.log

Co-authored-by: Omar López <zomars@me.com>

* Address feedback

* Find connected account on Stripe

* Fix type error

* Add interactive transactions

* Remove console.logs

* Remove console.log

Co-authored-by: Omar López <zomars@me.com>

* Save currency to db (calcom#3086)

* Save currency to db

* Add missing translation

* Get currency from user credentials server side

* Adds stripe data schema

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* v1.7.2

* Hotfix/fix legacy user eventtypes (calcom#3116)

* includedDates would always disable excludedDates due to empty array

* Added migration to add all userids into _user_eventtype

Co-authored-by: Omar López <zomars@me.com>

* Fix undefined in Calendar and also add manage event again (calcom#3122)

* HotFix - Background not being transparent for [user]/[type] in embed (calcom#3121)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* fix redirect to upcoming booking (calcom#3129)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>

* Fix ordering of event-types (calcom#3126)

* Remove spacebooking from app-store (calcom#3119)

* Remove spacebooking from app-store

* Remove missing spacebooking variable

* padding fixes to menu and other improvements (calcom#3114)

* padding fixes to menu and other improvements

* nit

* nit

Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>

* Migration query + Schedule->EventType to EventType->Schedule (calcom#3140)

* Wrote migration query + change Schedule->EventType to EventType->Schedule

* Removed warning as it is not strictly true

* Fix/zoom response zod object (calcom#3141)

* Added deepPartial to zodResultSchema

* Adding passtrough to zoomResponseSchema

* Create .gitkeep

* Turborepo improvements (calcom#3139)

* WIP

* WIP

* Embed fixes

* Update turbo.json

* Update e2e-embed.yml

* E2E fixes

* Update turbo.json

* App store CLI cleanup

* Update turbo.json

* Update turbo.json

* Update turbo.json

* Update turbo.json

* Update turbo.json

* Update turbo.json

* Embed tests fixes

* scroll to times after clicking a day, two column layout mobile (calcom#3147)

* Submodule sync

* save appId in zoom callback (calcom#3145)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Update .gitignore

* Fixes local dev env checks

* Runs format script

* Prevents 404 in networks tab for TRIAL users

* Fixes over Turborepo improvements (calcom#3144)

* New Crowdin translations by Github Action (calcom#3117)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Teams skeleton loader (calcom#3148)

* Teams skeleton loader

* [id] skeleton

* Fix mt

Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Removed the Spinner in favour of a DatePicker skeleton loader (calcom#3146)

* Removed the Spinner in favour of a DatePicker skeleton loader

* removed number, lighter skeleton, dark mode fixes

* replaced button with div

* readded number

Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Broken Integration Alarm System (calcom#3135)

* Create broken integration email

* Send video on broken video link

* Add translations

* Add Trans components

* Remove calendars file

* Type fixes

* Add translations

* Fix type errors

* Fix Spanish translation

Co-authored-by: Omar López <zomars@me.com>

* Remove iCal event

* Locale fixes

* Clean up trans tag

* Apply suggested translation

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>

* Change email to en

* Fix type error

* Type fix

* Fix e2e

* Fix e2e

* Fix e2e

* Fix e2e

* Fix e2e

* Update webhookResponse-chromium.txt

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>

* removed hardcoded url for non-cal.com (calcom#3120)

* Submodule sync

* feat: adds new version endpoint in internal api (calcom#3155)

Co-authored-by: Agusti Fernandez Pardo <git@agusti.me>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Upgrades turbo and adds snaplet configs

* Delete manifest.json

* Create manifest.json

* Update Prisma to v3.15.2 to support data proxy (calcom#3124)

* Update Prisma to v3.15.2 to support data proxy

* Update package.json

* Update package.json

* Update package.json

* Update yarn.lock

* Update console

* Update turbo.json

Co-authored-by: zomars <zomars@me.com>

* Submodule sync

* Update yarn.lock

* New Crowdin translations by Github Action (calcom#3156)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* set right variable for name in hi_user_name (calcom#3162)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>

* Apps: Riverside/Whereby/Around  (calcom#3053)

* Add Whereby Boilerplate

* Whereby App

* around boilerplate

* AroundCo App

* Add Riverside App

* Add Riverside to details

* Fix URL validation

* Remove Icons

* Remove console.log

* revert merge

* Fix images

* Update Iconds to be SVG

* Add Disconnect button

* Fix type

* Fixing i18n merge

* Refactor app installations

* Update varient

* Update default responder + riverside logo

* Update apps/web/pages/event-types/[type].tsx

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>

* fix/request-reschedule-google-calendar-sync (calcom#3157)

* Pass calendarId as parameter to deleteEvent()

* Updated deleteEvent param and default when sending calendarId

* remove duplicate datepicker, slight changes to success page (calcom#3163)

* removed duplicate timezone dropdown

* minor fixes to success page and booking layout

* nit

* AvailabilityPage improvements (calcom#3118)

* Share WIP

* Embed tests fixes

* AvailabilityPage improvements

* Type fixes

* Fixes Datepicker day witdth

* Update troubleshoot.tsx

* Adds local cached slots and browsingDate

* Migrating DatePicker to use Dayjs for timeZone support

* Fixed Sunday not being available

* Added comment to clarify what is going on

* Minor bugfix in DatePicker, double empty slot markup

* Change selected date with URL through ?date..

* Initialize properly w/o query params, remove minDate for now

* Remove Loader as now using Skeleton

* Handle Etc/GMT edge case (not a timeZone)

* Added dark mode bg- color to SkeletonText + made text slightly more subtle on DatePicker

Co-authored-by: zomars <zomars@me.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Fixes yarn dx not setting up docker DB

* DatePicker Skeleton visibility improvements

* New Crowdin translations by Github Action (calcom#3166)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* v1.7.3

* Adds perf metrics for each tRPC endpoint

* AvailabilityPage cleanup

* Skeleton fixes

* Fix saving price and currency (calcom#3168)

* Prevents undefined classNames in Skeletons

* Update README.md

* Fix broken link (calcom#3172)

* New Crowdin translations by Github Action (calcom#3173)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Create SECURITY.md (calcom#3174)

* Create SECURITY.md

Creates a SECURITY.md file based on https://cal.com/security

* Update markdown formatting

* Negative days in trial license period (calcom#3133)

* Negative days in trial license period

* Update apps/web/public/static/locales/en/common.json

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>

* Hotfix: Fixing app types variants (fixes Hubspot) (calcom#3176)

* Fixing Hubspot

* Comment

* Only stale SSR requests

* Potential fix for availability timeout

* Potential fix for availability timeout

* Update zod-utils.ts

* Consolidates dayjs in a single package

* Recurring config missing from event (calcom#3182)

* Remove SSG prefetch

* Second potential fix for timeout

* Submodule sync

* Update package.json

* Fixes month name

* Possible timeout fix take 3

* v1.7.4

* Make the height of textarea as per container height but consider the text above it (calcom#3189)

* updated readme, new gif, added roadmap banner

* fix/availability-tz-offset (calcom#3185)

* Make i18n a non-batch request and non-cacheable (calcom#3188)

* change meeting url to a link (calcom#3198)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>

* Set theme initially so that the gneerated JS code knows the correct theme already (calcom#3193)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Updates snaplet transform script (calcom#3199)

* Update .gitignore

* Fixes local dev env checks

* Update transform.ts

* New Crowdin translations by Github Action (calcom#3196)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

* Remove '{}' to prevent overwriting .env.appStore value (calcom#3200)

* Fixes the slow performance due to the Dayjs timezone plugin (calcom#3201)

* Fixes the slow performance due to the Dayjs timezone plugin

* Bye.

* Parses busyTime in UTC

* Fix hubspot callback (calcom#3195)

Co-authored-by: Leo Giovanetti <hello@leog.me>

* If booking doesnt exist its 404 page but if it exists and eventType doesnt exist, log it for now and continue with the flow (calcom#3202)

* v1.7.5

* fix: event creation on external office calendar (calcom#3152)

* fix: event creation on external office calendar

* chore: simplify fix implementation

Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>

* Wrong color for Timezone selector on booking page (calcom#3187)

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>

* Removes unused files (calcom#3208)

* Adds next-unused

* Cleanup

* Update next-unused

* Removes next-unused

Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* There is lot of hardcoding links in application (calcom#3130)

* There is lot of hardcoding links in application

* Apply suggestions from code review

Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>

* Team event type scroll, manage team invite from mobile (calcom#3171)

* Seats events send email to attendees and organizer (calcom#3206)

* Add attendees to email notfications

* New seat title

* Change organizer email

* Clean console.log

* Fix type errors

* Update packages/emails/src/templates/OrganizerScheduledEmail.tsx

Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Attach credential id to destinationCalendar records (calcom#3197)

* Some tweaks to slots to fix server time effecting logic (calcom#3218)

* Implement profile back button (calcom#3165)

* Implement profile backbutton

* update slug to use username

* Back Button Improvments

Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Update next-auth to version 4.5.0 (calcom#3138)

* Submodule sync

* Matches zod version to the rest

* Update console

* Update yarn.lock

* v1.7.6

* Adds pull request labeler

* Auto adds bugs to bug hunting view

* Update bug-hunting.yml

* Fixes bug hunting file location

* Testing required checks

* Prevent name conflicts for e2e

* Update required-checks.yml

* GH workflow name collision fixes

* Update checks

* Don't run e2e for md files

* Path fixes

* Update required-checks.yml

* Update required-checks.yml

* Update required-checks.yml

* Update lint.yml

* Update required-checks.yml

* Debugging why is not ignoring e2e test

* Test

* Update CONTRIBUTING.md (calcom#3226)

* Update CONTRIBUTING.md

* Don't run e2e for md files

* Debugging why is not ignoring e2e test

* Update required-checks.yml

* Adds timeout to checks

* Update required-checks.yml

* Update required-checks.yml

* Update labeler.yml

* Update bug-hunting.yml

* Booking Module Improvements (calcom#3221)

* Fix momentary render of dates before skeleton

* Fix Hydration issue - We shouldnt guess timezone on server as it would be different from client causing hydration error

* Fix wrong trpcQuery result when clicking on a particular date. Also, fix last day of the month being never available

* Fix as per PR Feedback

* Fix ordering of credentials (calcom#3243)

* Split on slug to get profile page (calcom#3228)

* Split on slug to get profile page

* Fix teams slug

* Remove console.log

* Remove unneeded diff

* Update GH workflows

* updates GH workflow

* Removed forward slashes

* Matches phone input darkmode to the rest of inputs (calcom#3247)

* add error message for invalid phone number (calcom#3249)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>

* feature/settings-username-update (calcom#2306)

* WIP feature/settings-username-update

* WIP username change

* WIP downgrade stripe

* stripe downgrade and prorate preview

* new UI for username premium component

* Fix server side props

* Remove migration, changed field to metadata user

* WIP for update subscriptions

* WIP intent username table

* WIP saving and updating username via hooks

* WIP saving working username sub update

* WIP, update html to work with tests

* Added stripe test for username update go to stripe

* WIP username change test

* Working test for username change

* Fix timeout for flaky test

* Review changes, remove logs

* Move input username as a self contained component

* Self review changes

* Removing unnecesary arrow function

* Removed intentUsername table and now using user metadata

* Update website

* Update turbo.json

* Update e2e.yml

* Update yarn.lock

* Fixes for self host username update

* Revert yarn lock from main branch

* E2E fixes

* Centralizes username check

* Improvements

* WIP separate logic between premium and save username button

* WIP refactor username premium update

* Saving WIP

* WIP redo of username check

* WIP obtain action normal, update or downgrade

* Update username change components

* Fix test for change-username self host or cal server

* Fix user type for premiumTextfield

* Using now a global unique const to know if is selfhosted, css fixes

* Remove unused import

* Using dynamic import for username textfield, prevent submit on enter

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: zomars <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* Transpiling fixes

* New Crowdin translations by Github Action (calcom#3244)

* New Crowdin translations by Github Action

* Delete common.json

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>

* Update website

* Use next/script for header scripts

* Add sentry back

* Swap Cal branding

* Remove unused apps from app store file

* Hide unused profile page controls

* Hide unused onboarding elements

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: alannnc <alannnc@gmail.com>
Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Leo Giovanetti <hello@leog.me>
Co-authored-by: Choongkyu Kim <choongkyu.kim+gh@gmail.com>
Co-authored-by: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com>
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: Peer Richelsen <peer@cal.com>
Co-authored-by: Bailey Pumfleet <pumfleet@hey.com>
Co-authored-by: Agusti Fernandez Pardo <6601142+agustif@users.noreply.github.com>
Co-authored-by: Agusti Fernandez Pardo <git@agusti.me>
Co-authored-by: Esteban Dalel R <e.dalel10@uniandes.edu.co>
Co-authored-by: GlitchWitch <hello@glitchwitch.io>
Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: James Vansteenkiste <james@jamesvan.ca>
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 2a6492d commit 98c4b06
Show file tree
Hide file tree
Showing 332 changed files with 6,649 additions and 3,508 deletions.
3 changes: 2 additions & 1 deletion .env.appStore.example
Expand Up @@ -21,7 +21,8 @@ DAILY_SCALE_PLAN=''
# - GOOGLE CALENDAR/MEET/LOGIN
# Needed to enable Google Calendar integration and Login with Google
# @see https://github.com/calendso/calendso#obtaining-the-google-api-credentials
GOOGLE_API_CREDENTIALS='{}'
GOOGLE_API_CREDENTIALS=

# To enable Login with Google you need to:
# 1. Set `GOOGLE_API_CREDENTIALS` above
# 2. Set `GOOGLE_LOGIN_ENABLED` to `true`
Expand Down
4 changes: 3 additions & 1 deletion .env.example
Expand Up @@ -100,11 +100,13 @@ SEND_FEEDBACK_EMAIL=
NEXT_PUBLIC_IS_E2E=

# Used for internal billing system
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRODUCT=
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE=
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE=
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRO_PLAN_PRODUCT_ID=
STRIPE_PREMIUM_PLAN_PRODUCT_ID=
STRIPE_FREE_PLAN_PRODUCT_ID=

# Use for internal Public API Keys and optional
API_KEY_PREFIX=cal_
Expand Down
5 changes: 5 additions & 0 deletions .github/labeler.yml
@@ -0,0 +1,5 @@
"♻️ autoupdate":
- apps/web/public/static/locales/**/*.json

automerge:
- apps/web/public/static/locales/**/*.json
22 changes: 22 additions & 0 deletions .github/workflows/bug-hunting.yml
@@ -0,0 +1,22 @@
name: Add bugs to Bug Hunting

on:
issues:
types:
- opened
- labeled
pull_request:
types:
- opened
- labeled

jobs:
bug-hunting:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.1.0
with:
project-url: https://github.com/orgs/calcom/projects/1
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
labeled: '🐛 bug'
6 changes: 4 additions & 2 deletions .github/workflows/check-types.yml
@@ -1,10 +1,12 @@
name: Check types
on:
pull_request_target:
pull_request:
branches:
- main
paths:
- '**.tsx?'
jobs:
types:
check-types:
name: Check types
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-bookingReminder.yml
Expand Up @@ -7,7 +7,7 @@ on:
# Runs “At minute 0, 15, 30, and 45.” (see https://crontab.guru)
- cron: "0,15,30,45 * * * *"
jobs:
cron:
cron-bookingReminder:
env:
APP_URL: ${{ secrets.APP_URL }}
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cron-downgradeUsers.yml
Expand Up @@ -7,7 +7,7 @@ on:
# Runs “At minute 0, 15, 30, and 45.” (see https://crontab.guru)
- cron: "0,15,30,45 * * * *"
jobs:
cron:
cron-downgradeUsers:
env:
APP_URL: ${{ secrets.APP_URL }}
CRON_API_KEY: ${{ secrets.CRON_API_KEY }}
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/e2e-embed.yml
@@ -1,20 +1,14 @@
name: E2E test
name: E2E tests Embed
on:
pull_request_target: # So we can test on forks
pull_request: # So we can test on forks
branches:
- main
# Embed e2e - tests verify booking flow which is applicable to non-embed case also. So, don't ignore apps/web changes.
paths-ignore:
- apps/api/**
- apps/console/**
- apps/docs/**
- apps/swagger/**
- apps/website/**
- apps/web/public/**
- tests/**
- playwright/**
paths:
- apps/web/**
- packages/embeds/**
jobs:
test:
e2e-embed:
timeout-minutes: 20
name: Embed and booking flow(for non-embed as well)
strategy:
Expand All @@ -33,6 +27,9 @@ jobs:
# CRON_API_KEY: xxx
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
Expand Down Expand Up @@ -89,9 +86,8 @@ jobs:
- name: Install playwright deps
# if: steps.playwright-cache.outputs.cache-hit != 'true'
run: yarn playwright install --with-deps
- run: yarn embed-tests-prepare
- run: yarn workspace @calcom/embed-core embed-tests-update-snapshots:ci
- run: yarn workspace @calcom/embed-react embed-tests-update-snapshots:ci
- name: Run Tests
run: yarn turbo run embed-tests-update-snapshots:ci --scope=@calcom/embed-react --concurrency=1

- name: Upload embed-core results
if: ${{ always() }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/e2e.yml
@@ -1,12 +1,13 @@
name: E2E test
on:
pull_request_target: # So we can test on forks
pull_request: # So we can test on forks
branches:
- main
paths-ignore:
- apps/web/public/static/locales/**
paths:
- apps/web/**
- packages/**
jobs:
test:
e2e:
timeout-minutes: 20
name: Testing ${{ matrix.node }} and ${{ matrix.os }}
strategy:
Expand All @@ -25,9 +26,15 @@ jobs:
# CRON_API_KEY: xxx
CALENDSO_ENCRYPTION_KEY: ${{ secrets.CI_CALENDSO_ENCRYPTION_KEY }}
NEXT_PUBLIC_STRIPE_PUBLIC_KEY: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PUBLIC_KEY }}
NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE }}
NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE: ${{ secrets.CI_NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE }}
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
STRIPE_CLIENT_ID: ${{ secrets.CI_STRIPE_CLIENT_ID }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.CI_STRIPE_WEBHOOK_SECRET }}
STRIPE_PRO_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PRO_PLAN_PRODUCT_ID }}
STRIPE_PREMIUM_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_PREMIUM_PLAN_PRODUCT_ID }}
STRIPE_FREE_PLAN_PRODUCT_ID: ${{ secrets.CI_STRIPE_FREE_PLAN_PRODUCT_ID }}
PAYMENT_FEE_PERCENTAGE: 0.005
PAYMENT_FEE_FIXED: 10
SAML_DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/labeler.yml
@@ -0,0 +1,14 @@
name: "Pull Request Labeler"
on:
- pull_request_target

jobs:
labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
@@ -1,8 +1,11 @@
name: Lint
on:
pull_request_target:
pull_request:
branches:
- main
paths:
- '**.tsx?'
- '**.jsx?'
jobs:
lint:
strategy:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/required-checks.yml
@@ -0,0 +1,40 @@
name: "Meta Workflow: Require Conditional Status Checks"
on:
pull_request:
branches:
- main
jobs:
required-checks:
strategy:
matrix:
node: ["16.x"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Ensure All Conditional Checks Have Passed
uses: blend/require-conditional-status-checks@2022.02.04
with:
timeout: 15m
github-token: ${{ github.token }}
interval: 20s
# Question marks aren't working
# @see https://github.com/blend/require-conditional-status-checks/pull/11
checks-yaml: |
- job: lint
paths:
- /**/*.jsx
- /**/*.js
- /**/*.tsx
- /**/*.ts
- job: check-types
paths:
- /**/*.tsx
- /**/*.ts
- job: e2e
paths:
- /apps/web/**
- /packages/**
- job: e2e-embed
paths:
- /apps/web/**
- /packages/embeds/**
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -72,3 +72,7 @@ dist

# Linting
lint-results

# Snaplet
.snaplet/snapshots
.snaplet/structure.d.ts
2 changes: 2 additions & 0 deletions .husky/pre-commit
Expand Up @@ -2,3 +2,5 @@
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged

yarn app-store:build && git add packages/app-store/*.generated.*
4 changes: 4 additions & 0 deletions .snaplet/config.json
@@ -0,0 +1,4 @@
{
"projectId": "cl4u26bwz7962859ply7ibuo43t",
"databaseUrl": "postgresql://postgres@localhost:5450/calendso"
}
3 changes: 3 additions & 0 deletions .snaplet/manifest.json
@@ -0,0 +1,3 @@
{
"version": "0.3.0"
}
97 changes: 97 additions & 0 deletions .snaplet/transform.ts
@@ -0,0 +1,97 @@
// This transform config was generated by Snaplet.
// Snaplet found fields that may contain personally identifiable information (PII)
// and used that to populate this file.
import { copycat as c } from "@snaplet/copycat";

import type { Transform } from "./structure";

function hasStringProp<T extends string>(x: unknown, key: T): x is { [key in T]: string } {
return !!x && typeof x === "object" && key in x;
}

function replaceKeyIfExists<T extends string>(x: object, key: T) {
if (hasStringProp(x, key)) {
return { ...x, [key]: c.uuid(x[key]) };
}
return x;
}

function generateSlug(x: string) {
return c.words(x, { max: 3 }).split(" ").join("-");
}

function replaceSensitiveKeys(record: object) {
return {
...record,
...replaceKeyIfExists(record, "client_id"),
...replaceKeyIfExists(record, "client_secret"),
...replaceKeyIfExists(record, "public_key"),
...replaceKeyIfExists(record, "api_key"),
...replaceKeyIfExists(record, "signing_secret"),
...replaceKeyIfExists(record, "access_token"),
...replaceKeyIfExists(record, "refresh_token"),
...replaceKeyIfExists(record, "stripe_user_id"),
...replaceKeyIfExists(record, "stripe_publishable_key"),
...replaceKeyIfExists(record, "accessToken"),
...replaceKeyIfExists(record, "refreshToken"),
...replaceKeyIfExists(record, "bot_user_id"),
...replaceKeyIfExists(record, "app_id"),
};
}

const generateUsername = (x: string) => `${c.firstName(x)}-${c.lastName(x)}${c.int(x, { min: 2, max: 99 })}`;

const config: Transform = () => ({
public: {
ApiKey: ({ row }) => ({
hashedKey: c.uuid(row.hashedKey),
}),
App: ({ row }) => ({
keys: replaceSensitiveKeys(row.keys),
}),
Attendee: ({ row }) => ({
email: c.email(row.email),
name: c.fullName(row.name),
timeZone: c.timezone(row.timeZone),
}),
Credential: ({ row }) => ({
key: typeof row.key === "string" ? c.uuid(row.key) : replaceSensitiveKeys(row.key),
}),
EventType: ({ row }) => ({
slug: generateSlug(row.slug),
timeZone: c.timezone(row.timeZone),
eventName: c.words(row.eventName, { max: 3 }),
}),
ResetPasswordRequest: ({ row }) => ({
email: c.email(row.email),
}),
Schedule: ({ row }) => ({
timeZone: c.timezone(row.timeZone),
}),
Team: ({ row }) => ({
bio: c.sentence(row.bio),
name: c.words(row.name, { max: 2 }),
slug: generateSlug(row.slug),
}),
users: ({ row }) =>
row.role !== "ADMIN"
? {
bio: c.sentence(row.bio),
email: c.email(row.email),
name: c.fullName(row.name),
password: c.password(row.password),
timeZone: c.timezone(row.timeZone),
username: generateUsername(row.username),
}
: row,
VerificationToken: ({ row }) => ({
token: c.uuid(row.token),
}),
Account: ({ row }) => ({
access_token: c.uuid(row.access_token),
refresh_token: c.uuid(row.refresh_token),
}),
},
});

export default config;

0 comments on commit 98c4b06

Please sign in to comment.