Skip to content

feat: twitter web conversions - #2220

Merged
aashishmalik merged 17 commits into
developfrom
feat.twitter-ads-conversions
Jun 15, 2023
Merged

aashishmalik merged 17 commits into
developfrom
feat.twitter-ads-conversions

Conversation

@aashishmalik

Copy link
Copy Markdown
Contributor

Description of the change

twitter web conversions

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@aashishmalik
aashishmalik requested a review from a team as a code owner May 31, 2023 04:36
@aashishmalik
aashishmalik requested a review from a team May 31, 2023 04:36
@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch from 93a129c to 8613ee4 Compare May 31, 2023 04:36
@aashishmalik
aashishmalik marked this pull request as draft May 31, 2023 04:36
@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch 2 times, most recently from 730b250 to e8ac1aa Compare June 2, 2023 04:41
@aashishmalik
aashishmalik marked this pull request as ready for review June 2, 2023 04:41
@aashishmalik
aashishmalik requested a review from a team as a code owner June 2, 2023 04:41
mihir-4116
mihir-4116 previously approved these changes Jun 2, 2023
@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch from 70c72e8 to 471d394 Compare June 2, 2023 07:11
Comment thread package.json Resolved
@sanpj2292

Copy link
Copy Markdown

Can we add Notion link in the PR's description ?

@aashishmalik

Copy link
Copy Markdown
Contributor Author

Can we add Notion link in the PR's description ?

We don't add notion link in open source repos

@sanpj2292
sanpj2292 self-requested a review June 14, 2023 05:35
@sanpj2292

Copy link
Copy Markdown

@aashishmalik can we address sonar code-smells ?

@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch from 7dde86e to 99a33cb Compare June 14, 2023 05:36
@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch from a078134 to ee6c8fe Compare June 14, 2023 06:13
@sanpj2292

Copy link
Copy Markdown

To fix the latest code-smell

function populateContents(requestJson) {
  const reqJson = { ...requestJson };
  if (reqJson.contents) {
    const transformedContents = requestJson.contents.map(obj => ({
      ...(obj.id && { content_id: obj.id }),
      ...(obj.groupId && { content_group_id: obj.groupId }),
      ...(obj.name && { content_name: obj.name }),
      ...(obj.price && { content_price: parseFloat(obj.price) }),
      ...(obj.type && { content_type: obj.type }),
      ...(obj.quantity && { num_items: parseInt(obj.quantity, 10) })
    })).filter(tfObj => Object.keys(tfObj).length > 0);
    if (transformedContents.length > 0) {
      reqJson.contents = transformedContents;
    }
  }
  return reqJson;
}

@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch from 5d8e5c1 to 9a7a612 Compare June 14, 2023 06:42
@sanpj2292
sanpj2292 requested a review from mihir-4116 June 14, 2023 07:45
sanpj2292
sanpj2292 previously approved these changes Jun 14, 2023
Comment thread test/__tests__/twitter_ads.test.js Resolved
@aashishmalik
aashishmalik force-pushed the feat.twitter-ads-conversions branch from 0796095 to c8dc784 Compare June 14, 2023 21:13
@sanpj2292
sanpj2292 requested a review from koladilip June 15, 2023 04:44
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

83.2% 83.2% Coverage
0.0% 0.0% Duplication

@aashishmalik
aashishmalik merged commit 3791dd4 into develop Jun 15, 2023
krishna2020 pushed a commit that referenced this pull request Jun 20, 2023
* feat: twiiter web conversions

* feat: twiiter ads transformation

* fix: add oauth1 dev dependency

* fix: add oauth1 dev dependency

* fix: add oauth1 dev dependency

* fix: eslint fixes

* fix: addressed comments

* fix: addressed comments

* fix: populateEventId func return eventId

* fix: populateEventId func return eventId

* fix: sonar code smells

* fix: sonar code smells

* fix: replace some with find function

* fix: replace some with find function

* chore: remove unnecessary console.log

Signed-off-by: Sai Sankeerth <[email protected]>

---------

Signed-off-by: Sai Sankeerth <[email protected]>
Co-authored-by: Sai Sankeerth <[email protected]>
@devops-github-rudderstack
devops-github-rudderstack deleted the feat.twitter-ads-conversions branch September 16, 2023 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants