Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump tibdex/github-app-token from 1.3.0 to 1.8.0 #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/issue_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@36464acb844fc53b9b8b2401da68844f6b05ebb0
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.ISSUE_APP_ID }}
private_key: ${{ secrets.ISSUE_APP_PEM }}
Expand Down
11 changes: 10 additions & 1 deletion modules/adotBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ function getOpenRTBSiteObject(bidderRequest) {
name: domain,
publisher: {
id: publisherId
},
ext: {
schain: bidderRequest.schain
}
};
}
Expand All @@ -83,7 +86,13 @@ function getOpenRTBDeviceObject() {
*/
function getOpenRTBUserObject(bidderRequest) {
if (!bidderRequest || !bidderRequest.gdprConsent || !isStr(bidderRequest.gdprConsent.consentString)) return null;
return { ext: { consent: bidderRequest.gdprConsent.consentString } };

return {
ext: {
consent: bidderRequest.gdprConsent.consentString,
pubProvidedId: bidderRequest.userId && bidderRequest.userId.pubProvidedId,
},
};
}

/**
Expand Down
21 changes: 12 additions & 9 deletions test/spec/modules/adotBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Adot Adapter', function () {
it('should build request (banner)', function () {
const bidderRequestId = 'bidderRequestId';
const validBidRequests = [{ bidderRequestId, mediaTypes: {} }, { bidderRequestId, bidId: 'bidId', mediaTypes: { banner: { sizes: [[300, 250]] } }, params: { placementId: 'placementId', adUnitCode: 200 } }];
const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true } };
const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true }, userId: { pubProvidedId: 'userId' }, schain: { ver: '1.0' } };

const request = spec.buildRequests(validBidRequests, bidderRequest);
const buildBidRequestResponse = {
Expand All @@ -54,10 +54,11 @@ describe('Adot Adapter', function () {
publisher: {
// id: 'adot'
id: undefined
}
},
ext: { schain: { ver: '1.0' } }
},
device: { ua: navigator.userAgent, language: navigator.language },
user: { ext: { consent: bidderRequest.gdprConsent.consentString } },
user: { ext: { consent: bidderRequest.gdprConsent.consentString, pubProvidedId: 'userId' } },
regs: { ext: { gdpr: bidderRequest.gdprConsent.gdprApplies } },
ext: {
adot: { adapter_version: 'v2.0.0' },
Expand All @@ -76,7 +77,7 @@ describe('Adot Adapter', function () {
it('should build request (native)', function () {
const bidderRequestId = 'bidderRequestId';
const validBidRequests = [{ bidderRequestId, mediaTypes: {} }, { bidderRequestId, bidId: 'bidId', mediaTypes: { native: { title: { required: true, len: 50, sizes: [[300, 250]] }, wrong: {}, image: {} } }, params: { placementId: 'placementId', adUnitCode: 200 } }];
const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true } };
const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true }, userId: { pubProvidedId: 'userId' }, schain: { ver: '1.0' } };

const request = spec.buildRequests(validBidRequests, bidderRequest);
const buildBidRequestResponse = {
Expand All @@ -101,10 +102,11 @@ describe('Adot Adapter', function () {
publisher: {
// id: 'adot'
id: undefined
}
},
ext: { schain: { ver: '1.0' } }
},
device: { ua: navigator.userAgent, language: navigator.language },
user: { ext: { consent: bidderRequest.gdprConsent.consentString } },
user: { ext: { consent: bidderRequest.gdprConsent.consentString, pubProvidedId: 'userId' } },
regs: { ext: { gdpr: bidderRequest.gdprConsent.gdprApplies } },
ext: {
adot: { adapter_version: 'v2.0.0' },
Expand All @@ -123,7 +125,7 @@ describe('Adot Adapter', function () {
it('should build request (video)', function () {
const bidderRequestId = 'bidderRequestId';
const validBidRequests = [{ bidderRequestId, mediaTypes: {} }, { bidderRequestId, bidId: 'bidId', mediaTypes: { video: { playerSize: [[300, 250]], minduration: 1, maxduration: 2, api: 'api', linearity: 'linearity', mimes: [], placement: 'placement', playbackmethod: 'playbackmethod', protocols: 'protocol', startdelay: 'startdelay' } }, params: { placementId: 'placementId', adUnitCode: 200 } }];
const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true } };
const bidderRequest = { position: 2, refererInfo: { page: 'http://localhost.com', domain: 'localhost.com' }, gdprConsent: { consentString: 'consentString', gdprApplies: true }, userId: { pubProvidedId: 'userId' }, schain: { ver: '1.0' } };

const request = spec.buildRequests(validBidRequests, bidderRequest);
const buildBidRequestResponse = {
Expand Down Expand Up @@ -160,10 +162,11 @@ describe('Adot Adapter', function () {
publisher: {
// id: 'adot'
id: undefined
}
},
ext: { schain: { ver: '1.0' } }
},
device: { ua: navigator.userAgent, language: navigator.language },
user: { ext: { consent: bidderRequest.gdprConsent.consentString } },
user: { ext: { consent: bidderRequest.gdprConsent.consentString, pubProvidedId: 'userId' } },
regs: { ext: { gdpr: bidderRequest.gdprConsent.gdprApplies } },
ext: {
adot: { adapter_version: 'v2.0.0' },
Expand Down