-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat.upgrade-to-node-v20-int-1547
- Loading branch information
Showing
107 changed files
with
9,378 additions
and
3,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
@@ -40,13 +40,11 @@ jobs: | |
run: | | ||
npm run test:ts -- component | ||
- name: Uplaod Report to S3 | ||
run: | | ||
aws s3 cp ./test_reports/ s3://test-integrations-dev/integrations-test-reports/rudder-transformer/${{ github.event.number }}/ --recursive | ||
- name: Comment on PR with S3 Object URL | ||
- name: Add Test Report Link as Comment on PR | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.PAT }} | ||
|
@@ -55,10 +53,23 @@ jobs: | |
// Get the pull request number | ||
const prNumber = context.payload.pull_request.number; | ||
const commentBody = `Test report for this run is available at: https://test-integrations-dev.s3.amazonaws.com/integrations-test-reports/rudder-transformer/${prNumber}/test-report.html`; | ||
// find all the comments of the PR | ||
const issueComments = await github.paginate(github.rest.issues.listComments, { | ||
owner, | ||
repo, | ||
issue_number: prNumber, | ||
}); | ||
for (const comment of issueComments) { | ||
if (comment.body === commentBody) { | ||
console.log('Comment already exists'); | ||
return; | ||
} | ||
} | ||
// Comment on the pull request | ||
github.rest.issues.createComment({ | ||
await github.rest.issues.createComment({ | ||
owner, | ||
repo, | ||
issue_number: prNumber, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 == 'koladilip' || 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 == 'koladilip' || 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 == 'koladilip' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'utsabc') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc') | ||
steps: | ||
- name: Create Branch | ||
uses: peterjgrainger/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
# Only allow release stakeholders to initiate releases | ||
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || 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 == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'ujjwal-ab') | ||
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'utsabc') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || 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 == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'utsabc') | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
@@ -40,12 +40,14 @@ jobs: | |
npm run lint:fix | ||
- name: Upload Coverage Reports to Codecov | ||
uses: codecov/codecov-action@v3.1.4 | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
directory: ./reports/coverage | ||
|
||
- name: Upload TS Coverage Reports to Codecov | ||
uses: codecov/[email protected] | ||
uses: codecov/[email protected] | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
directory: ./reports/ts-coverage | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
fetch-depth: 0 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
@@ -89,7 +89,7 @@ jobs: | |
|
||
- name: Notify Slack Channel | ||
id: slack | ||
uses: slackapi/slack-github-action@v1.24.0 | ||
uses: slackapi/slack-github-action@v1.25.0 | ||
continue-on-error: true | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
fetch-depth: 1 | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const { getMappingConfig } = require('../../../../v0/util'); | ||
|
||
const BASE_URL = 'https://api.bluecore.com/api/track/mobile/v1'; | ||
|
||
const CONFIG_CATEGORIES = { | ||
IDENTIFY: { | ||
name: 'bluecoreIdentifyConfig', | ||
type: 'identify', | ||
}, | ||
TRACK: { | ||
name: 'bluecoreTrackConfig', | ||
type: 'track', | ||
}, | ||
COMMON: { | ||
name: 'bluecoreCommonConfig', | ||
type: 'common', | ||
}, | ||
}; | ||
|
||
const EVENT_NAME_MAPPING = [ | ||
{ | ||
src: ['product viewed'], | ||
dest: 'viewed_product', | ||
}, | ||
{ | ||
src: ['products searched'], | ||
dest: 'search', | ||
}, | ||
{ | ||
src: ['product added'], | ||
dest: 'add_to_cart', | ||
}, | ||
{ | ||
src: ['product removed'], | ||
dest: 'remove_from_cart', | ||
}, | ||
{ | ||
src: ['product added to wishlist'], | ||
dest: 'wishlist', | ||
}, | ||
{ | ||
src: ['order completed'], | ||
dest: 'purchase', | ||
}, | ||
]; | ||
|
||
const BLUECORE_EXCLUSION_FIELDS = ['query', 'order_id', 'total']; | ||
|
||
const MAPPING_CONFIG = getMappingConfig(CONFIG_CATEGORIES, __dirname); | ||
module.exports = { | ||
CONFIG_CATEGORIES, | ||
MAPPING_CONFIG, | ||
EVENT_NAME_MAPPING, | ||
BASE_URL, | ||
BLUECORE_EXCLUSION_FIELDS, | ||
}; |
52 changes: 52 additions & 0 deletions
52
src/cdk/v2/destinations/bluecore/data/bluecoreCommonConfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"destKey": "properties.customer.name", | ||
"sourceKeys": "name", | ||
"required": false, | ||
"sourceFromGenericMap": true | ||
}, | ||
{ | ||
"destKey": "properties.customer.first_name", | ||
"sourceKeys": "firstName", | ||
"required": false, | ||
"sourceFromGenericMap": true | ||
}, | ||
{ | ||
"destKey": "properties.customer.last_name", | ||
"sourceKeys": "lastName", | ||
"required": false, | ||
"sourceFromGenericMap": true | ||
}, | ||
{ | ||
"destKey": "properties.customer.age", | ||
"sourceKeys": ["context.traits.age", "traits.age"], | ||
"required": false | ||
}, | ||
{ | ||
"destKey": "properties.customer.sex", | ||
"sourceKeys": ["traits.gender", "context.traits.gender", "traits.sex", "context.traits.sex"], | ||
"required": false | ||
}, | ||
{ | ||
"destKey": "properties.customer.address", | ||
"sourceKeys": "address", | ||
"required": false, | ||
"sourceFromGenericMap": true | ||
}, | ||
{ | ||
"destKey": "properties.customer.email", | ||
"sourceKeys": "email", | ||
"required": false, | ||
"sourceFromGenericMap": true | ||
}, | ||
{ | ||
"destKey": "properties.client", | ||
"sourceKeys": "context.app.version", | ||
"required": false | ||
}, | ||
{ | ||
"destKey": "properties.device", | ||
"sourceKeys": "context.device.model", | ||
"required": false | ||
} | ||
] |
7 changes: 7 additions & 0 deletions
7
src/cdk/v2/destinations/bluecore/data/bluecoreIdentifyConfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ | ||
{ | ||
"destKey": "event", | ||
"sourceKeys": ["traits.action", "context.traits.action"], | ||
"required": false | ||
} | ||
] |
22 changes: 22 additions & 0 deletions
22
src/cdk/v2/destinations/bluecore/data/bluecoreTrackConfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"destKey": "properties.search_term", | ||
"sourceKeys": "properties.query", | ||
"required": false | ||
}, | ||
{ | ||
"destKey": "properties.order_id", | ||
"sourceKeys": "properties.order_id", | ||
"required": false | ||
}, | ||
{ | ||
"destKey": "properties.total", | ||
"sourceKeys": "properties.total", | ||
"required": false | ||
}, | ||
{ | ||
"destKey": "properties.products", | ||
"sourceKeys": ["properties.products"], | ||
"required": false | ||
} | ||
] |
Oops, something went wrong.