From 1a61a734cfb31fd18cbfddba7ea8302b8bb5634c Mon Sep 17 00:00:00 2001 From: RuzannaAvetisyan <44729750+RuzannaAvetisyan@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:37:08 +0400 Subject: [PATCH 1/5] Added new custom fields (#2) --- modules/limelightDigitalBidAdapter.js | 7 +++- modules/limelightDigitalBidAdapter.md | 14 ++++++- .../limelightDigitalBidAdapter_spec.js | 40 ++++++++++++++++--- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/modules/limelightDigitalBidAdapter.js b/modules/limelightDigitalBidAdapter.js index 87cf6e4fe21..8c94498be3e 100644 --- a/modules/limelightDigitalBidAdapter.js +++ b/modules/limelightDigitalBidAdapter.js @@ -159,6 +159,11 @@ function buildPlacement(bidRequest) { publisherId: bidRequest.params.publisherId, userIdAsEids: bidRequest.userIdAsEids, supplyChain: bidRequest.schain - } + }, + custom1: bidRequest.params.custom1, + custom2: bidRequest.params.custom2, + custom3: bidRequest.params.custom3, + custom4: bidRequest.params.custom4, + custom5: bidRequest.params.custom5 } } diff --git a/modules/limelightDigitalBidAdapter.md b/modules/limelightDigitalBidAdapter.md index a4abb6f1411..2c773859a7f 100644 --- a/modules/limelightDigitalBidAdapter.md +++ b/modules/limelightDigitalBidAdapter.md @@ -24,7 +24,12 @@ var adUnits = [{ params: { host: 'exchange-9qao.ortb.net', adUnitId: 0, - adUnitType: 'banner' + adUnitType: 'banner', + custom1: 'custom1', + custom2: 'custom2', + custom3: 'custom3', + custom4: 'custom4', + custom5: 'custom5' } }] }]; @@ -40,7 +45,12 @@ var videoAdUnit = [{ params: { host: 'exchange-9qao.ortb.net', adUnitId: 0, - adUnitType: 'video' + adUnitType: 'video', + custom1: 'custom1', + custom2: 'custom2', + custom3: 'custom3', + custom4: 'custom4', + custom5: 'custom5' } }] }]; diff --git a/test/spec/modules/limelightDigitalBidAdapter_spec.js b/test/spec/modules/limelightDigitalBidAdapter_spec.js index 4efb4f4e84d..ebfa1e0e752 100644 --- a/test/spec/modules/limelightDigitalBidAdapter_spec.js +++ b/test/spec/modules/limelightDigitalBidAdapter_spec.js @@ -10,7 +10,12 @@ describe('limelightDigitalAdapter', function () { host: 'exchange.ortb.net', adUnitId: 123, adUnitType: 'banner', - publisherId: 'perfectPublisher' + publisherId: 'perfectPublisher', + custom1: 'custom1', + custom2: 'custom2', + custom3: 'custom3', + custom4: 'custom4', + custom5: 'custom5' }, placementCode: 'placement_0', auctionId: '74f78609-a92d-4cf1-869f-1b244bbfb5d2', @@ -49,7 +54,12 @@ describe('limelightDigitalAdapter', function () { params: { host: 'ads.project-limelight.com', adUnitId: 456, - adUnitType: 'banner' + adUnitType: 'banner', + custom1: 'custom1', + custom2: 'custom2', + custom3: 'custom3', + custom4: 'custom4', + custom5: 'custom5' }, placementCode: 'placement_1', auctionId: '482f88de-29ab-45c8-981a-d25e39454a34', @@ -90,7 +100,12 @@ describe('limelightDigitalAdapter', function () { host: 'exchange.ortb.net', adUnitId: 789, adUnitType: 'video', - publisherId: 'secondPerfectPublisher' + publisherId: 'secondPerfectPublisher', + custom1: 'custom1', + custom2: 'custom2', + custom3: 'custom3', + custom4: 'custom4', + custom5: 'custom5' }, placementCode: 'placement_2', auctionId: 'e4771143-6aa7-41ec-8824-ced4342c96c8', @@ -128,7 +143,12 @@ describe('limelightDigitalAdapter', function () { params: { host: 'exchange.ortb.net', adUnitId: 789, - adUnitType: 'video' + adUnitType: 'video', + custom1: 'custom1', + custom2: 'custom2', + custom3: 'custom3', + custom4: 'custom4', + custom5: 'custom5' }, placementCode: 'placement_2', auctionId: 'e4771143-6aa7-41ec-8824-ced4342c96c8', @@ -182,11 +202,21 @@ describe('limelightDigitalAdapter', function () { 'deviceWidth', 'deviceHeight', 'secure', - 'adUnits' + 'adUnits', + 'custom1', + 'custom2', + 'custom3', + 'custom4', + 'custom5' ); expect(data.deviceWidth).to.be.a('number'); expect(data.deviceHeight).to.be.a('number'); expect(data.secure).to.be.a('boolean'); + expect(data.custom1).to.be.a('string'); + expect(data.custom2).to.be.a('string'); + expect(data.custom3).to.be.a('string'); + expect(data.custom4).to.be.a('string'); + expect(data.custom5).to.be.a('string'); data.adUnits.forEach(adUnit => { expect(adUnit).to.have.all.keys( 'id', From 126e8ced08188f4f8fefdf422b8049edbf26d9b2 Mon Sep 17 00:00:00 2001 From: apykhteyev Date: Wed, 25 Jan 2023 01:36:07 +0700 Subject: [PATCH 2/5] Fixed integration --- modules/limelightDigitalBidAdapter.js | 19 ++++++++------- .../limelightDigitalBidAdapter_spec.js | 24 +++++++++---------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/modules/limelightDigitalBidAdapter.js b/modules/limelightDigitalBidAdapter.js index 8c94498be3e..88d52894d76 100644 --- a/modules/limelightDigitalBidAdapter.js +++ b/modules/limelightDigitalBidAdapter.js @@ -55,8 +55,9 @@ export const spec = { winTop = window; } const placements = groupBy(validBidRequests.map(bidRequest => buildPlacement(bidRequest)), 'host') - return Object.keys(placements) + let map = Object.keys(placements) .map(host => buildRequest(winTop, host, placements[host].map(placement => placement.adUnit))); + return map; }, /** @@ -113,7 +114,7 @@ export const spec = { registerBidder(spec); -function buildRequest(winTop, host, adUnits) { +function buildRequest(winTop, host, adUnits, bidRequest) { return { method: 'POST', url: `https://${host}/hb`, @@ -158,12 +159,12 @@ function buildPlacement(bidRequest) { type: bidRequest.params.adUnitType.toUpperCase(), publisherId: bidRequest.params.publisherId, userIdAsEids: bidRequest.userIdAsEids, - supplyChain: bidRequest.schain - }, - custom1: bidRequest.params.custom1, - custom2: bidRequest.params.custom2, - custom3: bidRequest.params.custom3, - custom4: bidRequest.params.custom4, - custom5: bidRequest.params.custom5 + supplyChain: bidRequest.schain, + custom1: bidRequest.params.custom1, + custom2: bidRequest.params.custom2, + custom3: bidRequest.params.custom3, + custom4: bidRequest.params.custom4, + custom5: bidRequest.params.custom5 + } } } diff --git a/test/spec/modules/limelightDigitalBidAdapter_spec.js b/test/spec/modules/limelightDigitalBidAdapter_spec.js index ebfa1e0e752..5a92110abb4 100644 --- a/test/spec/modules/limelightDigitalBidAdapter_spec.js +++ b/test/spec/modules/limelightDigitalBidAdapter_spec.js @@ -202,21 +202,11 @@ describe('limelightDigitalAdapter', function () { 'deviceWidth', 'deviceHeight', 'secure', - 'adUnits', - 'custom1', - 'custom2', - 'custom3', - 'custom4', - 'custom5' + 'adUnits' ); expect(data.deviceWidth).to.be.a('number'); expect(data.deviceHeight).to.be.a('number'); expect(data.secure).to.be.a('boolean'); - expect(data.custom1).to.be.a('string'); - expect(data.custom2).to.be.a('string'); - expect(data.custom3).to.be.a('string'); - expect(data.custom4).to.be.a('string'); - expect(data.custom5).to.be.a('string'); data.adUnits.forEach(adUnit => { expect(adUnit).to.have.all.keys( 'id', @@ -226,7 +216,12 @@ describe('limelightDigitalAdapter', function () { 'transactionId', 'publisherId', 'userIdAsEids', - 'supplyChain' + 'supplyChain', + 'custom1', + 'custom2', + 'custom3', + 'custom4', + 'custom5' ); expect(adUnit.id).to.be.a('number'); expect(adUnit.bidId).to.be.a('string'); @@ -235,6 +230,11 @@ describe('limelightDigitalAdapter', function () { expect(adUnit.sizes).to.be.an('array'); expect(adUnit.userIdAsEids).to.be.an('array'); expect(adUnit.supplyChain).to.be.an('object'); + expect(adUnit.custom1).to.be.a('string'); + expect(adUnit.custom2).to.be.a('string'); + expect(adUnit.custom3).to.be.a('string'); + expect(adUnit.custom4).to.be.a('string'); + expect(adUnit.custom5).to.be.a('string'); }) }) }) From 9e105c7a28cb2ba89311611f10e26694a9b21c6a Mon Sep 17 00:00:00 2001 From: apykhteyev Date: Wed, 25 Jan 2023 12:38:17 +0700 Subject: [PATCH 3/5] Fixes after review --- modules/limelightDigitalBidAdapter.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/limelightDigitalBidAdapter.js b/modules/limelightDigitalBidAdapter.js index 88d52894d76..bab65b95641 100644 --- a/modules/limelightDigitalBidAdapter.js +++ b/modules/limelightDigitalBidAdapter.js @@ -55,9 +55,8 @@ export const spec = { winTop = window; } const placements = groupBy(validBidRequests.map(bidRequest => buildPlacement(bidRequest)), 'host') - let map = Object.keys(placements) + return Object.keys(placements) .map(host => buildRequest(winTop, host, placements[host].map(placement => placement.adUnit))); - return map; }, /** @@ -81,7 +80,7 @@ export const spec = { * @param {ServerResponse} serverResponse A successful response from the server. * @return {Bid[]} An array of bids which were nested inside the server. */ - interpretResponse: (serverResponse, bidRequest) => { + interpretResponse: (serverResponse) => { const bidResponses = []; const serverBody = serverResponse.body; const len = serverBody.length; From c68afde9a98656612560c88a4f73b45ed239cc53 Mon Sep 17 00:00:00 2001 From: apykhteyev Date: Wed, 25 Jan 2023 12:44:30 +0700 Subject: [PATCH 4/5] Fixes after review --- modules/limelightDigitalBidAdapter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/limelightDigitalBidAdapter.js b/modules/limelightDigitalBidAdapter.js index bab65b95641..601d78578b3 100644 --- a/modules/limelightDigitalBidAdapter.js +++ b/modules/limelightDigitalBidAdapter.js @@ -80,7 +80,7 @@ export const spec = { * @param {ServerResponse} serverResponse A successful response from the server. * @return {Bid[]} An array of bids which were nested inside the server. */ - interpretResponse: (serverResponse) => { + interpretResponse: (serverResponse, bidRequest) => { const bidResponses = []; const serverBody = serverResponse.body; const len = serverBody.length; @@ -113,7 +113,7 @@ export const spec = { registerBidder(spec); -function buildRequest(winTop, host, adUnits, bidRequest) { +function buildRequest(winTop, host, adUnits) { return { method: 'POST', url: `https://${host}/hb`, From 83bc9757204b379497fa5151b1fc02588a3531c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 14:16:28 +0000 Subject: [PATCH 5/5] Bump tibdex/github-app-token from 1.7.0 to 1.8.0 Bumps [tibdex/github-app-token](https://github.com/tibdex/github-app-token) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/tibdex/github-app-token/releases) - [Commits](https://github.com/tibdex/github-app-token/compare/021a2405c7f990db57f5eae5397423dcc554159c...b62528385c34dbc9f38e5f4225ac829252d1ea92) --- updated-dependencies: - dependency-name: tibdex/github-app-token dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/issue_tracker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue_tracker.yml b/.github/workflows/issue_tracker.yml index 4a9502e38c1..35c6db80c26 100644 --- a/.github/workflows/issue_tracker.yml +++ b/.github/workflows/issue_tracker.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Generate token id: generate_token - uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c + uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 with: app_id: ${{ secrets.ISSUE_APP_ID }} private_key: ${{ secrets.ISSUE_APP_PEM }}