diff --git a/.github/workflows/client.yml b/.github/workflows/client.yml index 752e4c038c..011acc27ef 100644 --- a/.github/workflows/client.yml +++ b/.github/workflows/client.yml @@ -24,10 +24,16 @@ jobs: steps: # Checkout the code - - uses: actions/checkout@v2 + - name: Checkout the merged commit from PR and base branch + if: ${{ github.event_name == 'pull_request_target' }} + uses: actions/checkout@v2 with: ref: refs/pull/${{ github.event.pull_request.number }}/merge + - name: Checkout the head commit of the branch + if: ${{ github.event_name == 'push' }} + uses: actions/checkout@v2 + - name: Figure out the PR number run: echo ${{ github.event.pull_request.number }} @@ -103,7 +109,15 @@ jobs: steps: # Checkout the code - - uses: actions/checkout@v2 + - name: Checkout the merged commit from PR and base branch + if: ${{ github.event_name == 'pull_request_target' }} + uses: actions/checkout@v2 + with: + ref: refs/pull/${{ github.event.pull_request.number }}/merge + + - name: Checkout the head commit of the branch + if: ${{ github.event_name == 'push' }} + uses: actions/checkout@v2 - name: Use Node.js 10.16.3 uses: actions/setup-node@v1 @@ -207,7 +221,15 @@ jobs: steps: # Checkout the code - - uses: actions/checkout@v2 + - name: Checkout the merged commit from PR and base branch + if: ${{ github.event_name == 'pull_request_target' }} + uses: actions/checkout@v2 + with: + ref: refs/pull/${{ github.event.pull_request.number }}/merge + + - name: Checkout the head commit of the branch + if: ${{ github.event_name == 'push' }} + uses: actions/checkout@v2 - name: Download the react build artifact uses: actions/download-artifact@v2 diff --git a/app/client/src/pages/Applications/loader.tsx b/app/client/src/pages/Applications/loader.tsx index 4cac95fe6a..b107b92bd0 100644 --- a/app/client/src/pages/Applications/loader.tsx +++ b/app/client/src/pages/Applications/loader.tsx @@ -4,6 +4,7 @@ import { retryPromise } from "utils/AppsmithUtils"; import PerformanceTracker, { PerformanceTransactionName, } from "utils/PerformanceTracker"; +import AnalyticsUtil from "utils/AnalyticsUtil"; class ApplicationListLoader extends React.PureComponent { constructor(props: any) { @@ -17,6 +18,7 @@ class ApplicationListLoader extends React.PureComponent { componentDidMount() { PerformanceTracker.stopTracking(PerformanceTransactionName.SIGN_UP); PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK); + AnalyticsUtil.logEvent("APPLICATIONS_PAGE_LOAD"); retryPromise(() => import(/* webpackChunkName: "applications" */ "./index"), ).then(module => { diff --git a/app/client/src/utils/AnalyticsUtil.tsx b/app/client/src/utils/AnalyticsUtil.tsx index a90c0e1a84..3055933ce1 100644 --- a/app/client/src/utils/AnalyticsUtil.tsx +++ b/app/client/src/utils/AnalyticsUtil.tsx @@ -83,6 +83,7 @@ export type EventName = | "OPEN_HELP" | "INVITE_USER" | "PROPERTY_PANE_CLOSE_CLICK" + | "APPLICATIONS_PAGE_LOAD" | "EXECUTE_ACTION"; function getApplicationId(location: Location) { @@ -161,7 +162,7 @@ class AnalyticsUtil { })(window); } - static logEvent(eventName: EventName, eventData: any) { + static logEvent(eventName: EventName, eventData: any = {}) { const windowDoc: any = window; let finalEventData = eventData; const userData = AnalyticsUtil.user;