Skip to content

fix: added missing email check during primary email id filtering in zendesk destination - #4124

Merged
manish339k merged 1 commit into
developfrom
fix.zendesk_primary_email
Feb 28, 2025
Merged

manish339k merged 1 commit into
developfrom
fix.zendesk_primary_email

Conversation

@manish339k

Copy link
Copy Markdown
Contributor

What are the changes introduced in this PR?

Previously, when filtering for the primary email, we missed the type="email" condition. As a result, the code could mistakenly pick a different primary id, such as a phone primary id. This PR fixes the issue by ensuring that the primary email id is selected if a primary email is available.

What is the related Linear task?

Resolves INT-3329

Please explain the objectives of your changes below

Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

N/A

Any new dependencies introduced with this change?

N/A

Any new generic utility introduced or modified. Please explain the changes.

N/A

Any technical or performance related pointers to consider with the change?

N/A

@coderabbitai review


Developer checklist

  • My code follows the style guidelines of this project

  • No breaking changes are being introduced.

  • All related docs linked with the PR?

  • All changes manually tested?

  • Any documentation changes needed with this change?

  • Is the PR limited to 10 file changes?

  • Is the PR limited to one linear task?

  • Are relevant unit and component test-cases added in new readability format?

Reviewer checklist

  • Is the type of change in the PR title appropriate as per the changes?

  • Verified that there are no credentials or confidential data exposed with the changes.

{
httpReq: {
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
{
httpReq: {
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
{
httpReq: {
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
{
httpReq: {
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
{
httpReq: {
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
{
httpReq: {
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
params: {},
headers: {
'Content-Type': 'application/json',
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
method: 'POST',
endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json',
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
method: 'POST',
endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json',
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
method: 'POST',
endpoint: 'https://rudderlabshelp.zendesk.com/api/v2/users/create_or_update.json',
headers: {
Authorization: 'Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Basic bXlEdW1teVVzZXJOYW1lMS90b2tlbjpteUR1bW15QXBpVG9rZW40" is used as [authorization header](1).
@devops-github-rudderstack

Copy link
Copy Markdown
Contributor

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Feb 28, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.17%. Comparing base (ebd305b) to head (1d918f9).
Report is 20 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4124      +/-   ##
===========================================
+ Coverage    91.12%   91.17%   +0.04%     
===========================================
  Files          631      632       +1     
  Lines        32944    33098     +154     
  Branches      7807     7836      +29     
===========================================
+ Hits         30021    30177     +156     
- Misses        2673     2703      +30     
+ Partials       250      218      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manish339k
manish339k merged commit b991017 into develop Feb 28, 2025
@manish339k
manish339k deleted the fix.zendesk_primary_email branch February 28, 2025 09:45
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.

5 participants