Skip to content

Commit

Permalink
[Bitbucket] Normalize pluralization of PullReqeust(s) to match file name
Browse files Browse the repository at this point in the history
  • Loading branch information
nlowe committed Jan 12, 2019
1 parent 79c14da commit 1327bce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/bitbucket/bitbucket-pull-request.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ const serverSecrets = require('../../lib/server-secrets')
const { metric } = require('../../lib/text-formatters')
const { nonNegativeInteger } = require('../validators')

const bitbucketPullRequestsSchema = Joi.object({
const bitbucketPullRequestSchema = Joi.object({
size: nonNegativeInteger,
}).required()

function pullRequestClassGenerator(raw) {
const routePrefix = raw ? 'pr-raw' : 'pr'
const badgeSuffix = raw ? '' : ' open'

return class BitbucketPullRequests extends BaseJsonService {
return class BitbucketPullRequest extends BaseJsonService {
async fetchCloud({ args, user, repo }) {
args.url = `https://bitbucket.org/api/2.0/repositories/${user}/${repo}/pullrequests/`
args.options = { qs: { state: 'OPEN', limit: 0 } }
Expand Down Expand Up @@ -59,7 +59,7 @@ function pullRequestClassGenerator(raw) {

async fetch({ server, user, repo }) {
const args = {
schema: bitbucketPullRequestsSchema,
schema: bitbucketPullRequestSchema,
errorMessages: {
401: 'invalid credentials',
403: 'private repo',
Expand Down

0 comments on commit 1327bce

Please sign in to comment.