diff --git a/.github/workflows/create-hotfix-branch.yml b/.github/workflows/create-hotfix-branch.yml index 97611f1eee..03c79e0df1 100644 --- a/.github/workflows/create-hotfix-branch.yml +++ b/.github/workflows/create-hotfix-branch.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest # Only allow these users to create new hotfix branch from 'main' - if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab) + if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') steps: - name: Create Branch uses: peterjgrainger/action-create-branch@v2.4.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index b9256fa915..97a3a2c226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.49.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.0...v1.49.1) (2023-11-10) + + +### Bug Fixes + +* update create-hotfix-branch.yml ([#2815](https://github.com/rudderlabs/rudder-transformer/issues/2815)) ([dd884dd](https://github.com/rudderlabs/rudder-transformer/commit/dd884ddc78898bd7de155ec4f05ce8fe6e2c4b80)) + ## [1.49.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.48.0...v1.49.0) (2023-11-06) diff --git a/package-lock.json b/package-lock.json index 91f984e22c..f1d3be597c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.49.0", + "version": "1.49.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.49.0", + "version": "1.49.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index bfa2630971..076e912112 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.49.0", + "version": "1.49.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index d7101982a7..27d5bc3161 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -195,9 +195,9 @@ const handleTraits = (messageTrait, destination) => { const getScreenevTypeAndUpdatedProperties = (message, CATEGORY_KEY) => { const name = message.name || message.event || get(message, CATEGORY_KEY); - const updatedName = name ? `${name} ` : ''; + return { - eventType: `Viewed ${updatedName}Screen`, + eventType: `Viewed ${message.name || message.event || get(message, CATEGORY_KEY) || ''} Screen`, updatedProperties: { ...message.properties, name, @@ -578,8 +578,6 @@ const getGroupInfo = (destination, groupInfo, groupTraits) => { } return groupInfo; }; -const getUpdatedPageNameWithoutUserDefinedPageEventName = (name, message, CATEGORY_KEY) => - name || get(message, CATEGORY_KEY) ? `${name || get(message, CATEGORY_KEY)} ` : undefined; // Generic process function which invokes specific handler functions depending on message type // and event type where applicable @@ -615,12 +613,7 @@ const processSingleMessage = (message, destination) => { .trim() .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); } else { - const updatedName = getUpdatedPageNameWithoutUserDefinedPageEventName( - name, - message, - CATEGORY_KEY, - ); - evType = `Viewed ${updatedName || ''}Page`; + evType = `Viewed ${name || get(message, CATEGORY_KEY) || ''} Page`; } message.properties = { ...properties, diff --git a/test/__tests__/data/am_output.json b/test/__tests__/data/am_output.json index 34471f4922..ea4b8b908d 100644 --- a/test/__tests__/data/am_output.json +++ b/test/__tests__/data/am_output.json @@ -3944,7 +3944,7 @@ "id": "User Android", "userId": "User Android" }, - "event_type": "Viewed Screen", + "event_type": "Viewed Screen", "user_id": "User Android", "device_brand": "Google", "time": 1662393883250, @@ -4276,7 +4276,7 @@ "app_name": "RudderLabs JavaScript SDK", "app_version": "1.0.0", "language": "en-US", - "event_type": "Viewed Page", + "event_type": "Viewed Page", "event_properties": { "path": "/destinations/amplitude", "referrer": "",