diff --git a/services/circleci.js b/services/circleci.js index cffdcc0..6b178d5 100644 --- a/services/circleci.js +++ b/services/circleci.js @@ -1,13 +1,11 @@ // https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables -const {prNumber} = require('../lib/utils'); - module.exports = { detect({env}) { return Boolean(env.CIRCLECI); }, configuration({env}) { - const pr = env.CIRCLE_PR_NUMBER || prNumber(env.CIRCLE_PULL_REQUEST || env.CI_PULL_REQUEST); + const pr = env.CIRCLE_PR_NUMBER; const isPr = Boolean(pr); return { diff --git a/test/services/circleci.test.js b/test/services/circleci.test.js index f70fb0b..eac089d 100644 --- a/test/services/circleci.test.js +++ b/test/services/circleci.test.js @@ -32,7 +32,7 @@ test('Push', t => { test('PR 1.0', t => { t.deepEqual( - circle.configuration({env: Object.assign({}, env, {CIRCLE_BRANCH: 'pr-branch', CI_PULL_REQUEST: 'uri/pr/10'})}), + circle.configuration({env: Object.assign({}, env, {CIRCLE_BRANCH: 'pr-branch', CIRCLE_PR_NUMBER: '10'})}), { name: 'CircleCI', service: 'circleci', @@ -52,7 +52,7 @@ test('PR 1.0', t => { test('PR 2.0', t => { t.deepEqual( - circle.configuration({env: Object.assign({}, env, {CIRCLE_BRANCH: 'pr-branch', CIRCLE_PULL_REQUEST: 'uri/pr/10'})}), + circle.configuration({env: Object.assign({}, env, {CIRCLE_BRANCH: 'pr-branch', CIRCLE_PR_NUMBER: '10'})}), { name: 'CircleCI', service: 'circleci',