Skip to content

feat: remove duplicate ad-revenue key - #81

Merged
vgupta98 merged 2 commits into
feature/release-3.1.0from
feature/sdk-4360-remove-obsolete-ad-revenue-key
Apr 14, 2026
Merged

feat: remove duplicate ad-revenue key#81
vgupta98 merged 2 commits into
feature/release-3.1.0from
feature/sdk-4360-remove-obsolete-ad-revenue-key

Conversation

@vgupta98

Copy link
Copy Markdown
Contributor

Description

Remove duplicate kAppsFlyerAdRevenueAdType key mapping in promotion events (Promotion Viewed and Promotion Clicked) and fix a silent CI failure where the release branch deletion step lacked write permissions.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactor/optimization

Implementation Details

  • Remove duplicate ad-revenue key: In RudderAppsflyerIntegration.m, the Promotion Viewed and Promotion Clicked event handlers were setting the same CREATIVE property value to both @"af_adrev_ad_type" (literal string) and kAppsFlyerAdRevenueAdType (SDK constant that resolves to af_adrev_ad_type). Removed the redundant kAppsFlyerAdRevenueAdType line in both handlers.
  • Fix release branch deletion token: In publish-new-release.yml, the "Delete release branch" step used secrets.GITHUB_TOKEN which is restricted to read-only by the job-level permissions: contents: read added during the SEC-58 migration. Replaced with the app token (steps.generate-token.outputs.token) that already has contents: write permission.

Checklist

  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation (if appropriate).
  • I have ensured that my code follows the project's code style.
  • I have checked for potential performance impacts and optimized if necessary.
  • I have checked the code for security issues.
  • I have updated the changelog (if required).

How to test?

  • Duplicate key fix: Trigger a Promotion Viewed or Promotion Clicked event and verify that af_adrev_ad_type is set once (not duplicated) in the AppsFlyer event properties.
  • CI fix: Merge a release PR and verify the "Delete release branch" step successfully deletes the branch (check workflow logs for absence of 403 error in the deleteRef call).

Breaking Changes

None

Maintainers Checklist

  • The code has been reviewed.
  • CI tests have passed.
  • All necessary documentation has been updated.

Screenshots (if applicable)

N/A

Additional Context

The CI fix addresses a silent failure introduced by the SEC-58 PAT-to-App-Token migration. The koj-co/delete-merged-action swallows API errors, so the step appeared to succeed even when the deleteRef call returned a 403. Repos with the delete_branch_on_merge GitHub setting enabled may not notice the issue since GitHub auto-deletes the branch on merge.

…promotion events

Remove redundant kAppsFlyerAdRevenueAdType mapping from ECommPromotionViewed
and ECommPromotionClicked handlers, keeping only the string literal
"af_adrev_ad_type" which matches the original AFEventParamAdRevenueAdType
behavior.

Scanned-by: gitleaks 8.29.0
The delete-merged-action step used secrets.GITHUB_TOKEN which is
restricted to read-only by job-level permissions. Replace with the
app token that already has contents:write permission.

Scanned-by: gitleaks 8.29.0
@vgupta98 vgupta98 changed the title fix: remove duplicate ad-revenue key and fix release branch deletion token feat: remove duplicate ad-revenue key Apr 13, 2026
@vgupta98 vgupta98 self-assigned this Apr 13, 2026
@vgupta98
vgupta98 marked this pull request as ready for review April 13, 2026 09:23
@vgupta98
vgupta98 requested a review from SKannaniOS April 13, 2026 09:23

@SKannaniOS SKannaniOS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vgupta98
vgupta98 changed the base branch from master to feature/release-3.1.0 April 14, 2026 06:00
@vgupta98
vgupta98 merged commit c2fe954 into feature/release-3.1.0 Apr 14, 2026
16 checks passed
@vgupta98
vgupta98 deleted the feature/sdk-4360-remove-obsolete-ad-revenue-key branch April 14, 2026 06:01
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.

2 participants