diff --git a/jobs/github-event/installation_repositories/added.js b/jobs/github-event/installation_repositories/added.js index 58f330c3..2aa2cf3f 100644 --- a/jobs/github-event/installation_repositories/added.js +++ b/jobs/github-event/installation_repositories/added.js @@ -10,7 +10,7 @@ const { createDocs } = require('../../../lib/repository-docs') const max404Retries = 5 -module.exports = async function ({ installation, repositoriesAdded }) { +module.exports = async function ({ installation, repositories_added: repositoriesAdded }) { const { repositories: reposDb } = await dbs() const logs = dbs.getLogsDb() diff --git a/jobs/github-event/installation_repositories/removed.js b/jobs/github-event/installation_repositories/removed.js index 034c6986..540638ae 100644 --- a/jobs/github-event/installation_repositories/removed.js +++ b/jobs/github-event/installation_repositories/removed.js @@ -6,7 +6,7 @@ const statsd = require('../../../lib/statsd') const env = require('../../../lib/env') const { maybeUpdatePaymentsJob } = require('../../../lib/payments') -module.exports = async function ({ installation, repositoriesRemoved }) { +module.exports = async function ({ installation, repositories_removed: repositoriesRemoved }) { const { repositories: reposDb } = await dbs() const logs = dbs.getLogsDb() diff --git a/jobs/github-event/marketplace_purchase/cancelled.js b/jobs/github-event/marketplace_purchase/cancelled.js index e83ab047..423cf600 100644 --- a/jobs/github-event/marketplace_purchase/cancelled.js +++ b/jobs/github-event/marketplace_purchase/cancelled.js @@ -3,7 +3,7 @@ const Log = require('gk-log') const dbs = require('../../../lib/dbs') const upsert = require('../../../lib/upsert') -module.exports = async function ({ marketplacePurchase }) { +module.exports = async function ({ marketplace_purchase: marketplacePurchase }) { const { payments } = await dbs() const logs = dbs.getLogsDb() const log = Log({ diff --git a/jobs/github-event/marketplace_purchase/changed.js b/jobs/github-event/marketplace_purchase/changed.js index 5ab9881c..86ec8675 100644 --- a/jobs/github-event/marketplace_purchase/changed.js +++ b/jobs/github-event/marketplace_purchase/changed.js @@ -4,7 +4,7 @@ const dbs = require('../../../lib/dbs') const upsert = require('../../../lib/upsert') const normalizePlanName = require('../../../lib/normalize-plan-name') -module.exports = async function ({ marketplacePurchase }) { +module.exports = async function ({ marketplace_purchase: marketplacePurchase }) { const { payments } = await dbs() const logs = dbs.getLogsDb() const log = Log({ diff --git a/jobs/github-event/marketplace_purchase/purchased.js b/jobs/github-event/marketplace_purchase/purchased.js index 281fb7f3..c543d6a0 100644 --- a/jobs/github-event/marketplace_purchase/purchased.js +++ b/jobs/github-event/marketplace_purchase/purchased.js @@ -4,7 +4,7 @@ const dbs = require('../../../lib/dbs') const upsert = require('../../../lib/upsert') const normalizePlanName = require('../../../lib/normalize-plan-name') -module.exports = async function ({ marketplacePurchase }) { +module.exports = async function ({ marketplace_purchase: marketplacePurchase }) { const { payments } = await dbs() const logs = dbs.getLogsDb() const log = Log({ diff --git a/test/jobs/github-event/installation_repositories/added.js b/test/jobs/github-event/installation_repositories/added.js index 30393899..be0d313c 100644 --- a/test/jobs/github-event/installation_repositories/added.js +++ b/test/jobs/github-event/installation_repositories/added.js @@ -24,7 +24,7 @@ test('github-event installation_repositories but empty list of repos', async () id: 2 } }, - repositoriesAdded: [ + repositories_added: [ ] }) @@ -67,7 +67,7 @@ test('github-event installation_repositories added', async () => { id: 2 } }, - repositoriesAdded: [ + repositories_added: [ { id: 31, full_name: 'bar/repo1' }, { id: 32, full_name: 'bar/repo2' } ] @@ -134,7 +134,7 @@ test('github-event installation_repositories added with intermittent 404s', asyn id: 2 } }, - repositoriesAdded: [ + repositories_added: [ { id: 31, full_name: 'bar/repo1' }, { id: 32, full_name: 'bar/repo2' } ] @@ -200,7 +200,7 @@ test('github-event installation_repositories added with too many 404s', async () id: 2 } }, - repositoriesAdded: [ + repositories_added: [ { id: 31, full_name: 'bar/repo1' }, { id: 32, full_name: 'bar/repo2' } ] @@ -238,7 +238,7 @@ test('github-event installation_repositories added with a non 404 error', async id: 2 } }, - repositoriesAdded: [ + repositories_added: [ { id: 31, full_name: 'bar/repo1' }, { id: 32, full_name: 'bar/repo2' } ] diff --git a/test/jobs/github-event/installation_repositories/removed.js b/test/jobs/github-event/installation_repositories/removed.js index 4eb4e9fa..996e9ee5 100644 --- a/test/jobs/github-event/installation_repositories/removed.js +++ b/test/jobs/github-event/installation_repositories/removed.js @@ -16,7 +16,7 @@ test('github-event installation_repositories removed', async () => { type: 'installation_repositories', action: 'removed', installation: { account: { id: 2 } }, - repositoriesRemoved: [{ id: 22 }, { id: 25 }, { id: 26 }] + repositories_removed: [{ id: 22 }, { id: 25 }, { id: 26 }] }) expect(newJobs).toBeFalsy() diff --git a/test/jobs/github-event/marketplace_purchase/cancelled.js b/test/jobs/github-event/marketplace_purchase/cancelled.js index b63a8545..fd83235f 100644 --- a/test/jobs/github-event/marketplace_purchase/cancelled.js +++ b/test/jobs/github-event/marketplace_purchase/cancelled.js @@ -11,7 +11,7 @@ describe('marketplace canceled', async () => { }) const newJobs = await cancelPurchase({ - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 444, diff --git a/test/jobs/github-event/marketplace_purchase/changed.js b/test/jobs/github-event/marketplace_purchase/changed.js index 59f1c0fd..f5e5fa60 100644 --- a/test/jobs/github-event/marketplace_purchase/changed.js +++ b/test/jobs/github-event/marketplace_purchase/changed.js @@ -16,7 +16,7 @@ describe('marketplace changed', async () => { }) const newJobs = await changePurchase({ - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 444, diff --git a/test/jobs/github-event/marketplace_purchase/purchased.js b/test/jobs/github-event/marketplace_purchase/purchased.js index 0a036bf7..2a35c7dc 100644 --- a/test/jobs/github-event/marketplace_purchase/purchased.js +++ b/test/jobs/github-event/marketplace_purchase/purchased.js @@ -7,7 +7,7 @@ describe('marketplace purchased', async () => { const { payments } = await dbs() const newJob = await purchasePurchase({ - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 444, @@ -43,7 +43,7 @@ describe('marketplace purchased', async () => { }) const newJob = await purchasePurchase({ - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 445, @@ -81,7 +81,7 @@ describe('marketplace purchased', async () => { const newJob = await purchasePurchase({ action: 'purchased', effective_date: '2017-04-06T02:01:16Z', - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 446, @@ -123,7 +123,7 @@ describe('marketplace purchased', async () => { }) const newJob = await purchasePurchase({ - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 447, @@ -165,7 +165,7 @@ describe('marketplace purchased', async () => { const newJob = await purchasePurchase({ action: 'purchased', effective_date: '2017-04-06T02:01:16Z', - marketplacePurchase: { + marketplace_purchase: { account: { type: 'Organization', id: 448, diff --git a/test/lib/enterprise-setup.js b/test/lib/enterprise-setup.js index 81288530..909d33fd 100644 --- a/test/lib/enterprise-setup.js +++ b/test/lib/enterprise-setup.js @@ -3,7 +3,7 @@ const lolex = require('lolex') const enterpriseSetup = require('../../lib/enterprise-setup') describe('enterprise setup', () => { - test('creates LogsDb for actual and next month', async() => { + test('creates LogsDb for actual and next month', async () => { const clock = lolex.install() const enterpriseDbs = await enterpriseSetup() @@ -15,7 +15,7 @@ describe('enterprise setup', () => { clock.uninstall() }) - test('removes LogsDbs if there are older than 12 month', async() => { + test('removes LogsDbs if there are older than 12 month', async () => { const clock = lolex.install() let enterpriseDbs = await enterpriseSetup()