Code style fixes

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 8 years ago
parent 58c2653451
commit 9376803f40
  1. 4
      BuildServer/lib/commenter.ts
  2. 6
      BuildServer/lib/git/loader.ts
  3. 2
      BuildServer/lib/tasks/index.ts
  4. 8
      BuildServer/routes/postreceive.ts

@ -13,7 +13,7 @@ const maxCommentLength = 64000;
const writeComment = (options, message, callback) => options.github.issues.createComment({
"body": message,
"number": options.number,
"number": options.pullRequestNumber,
"owner": options.baseRepoOptions.owner,
"repo": options.baseRepoOptions.reponame
}, callback);
@ -24,7 +24,7 @@ const closePullRequest = (options, message, callback) => writeComment(options, m
}
return options.github.issues.edit({
"number": options.number,
"number": options.pullRequestNumber,
"owner": options.baseRepoOptions.owner,
"repo": options.baseRepoOptions.reponame,
"state": "closed"

@ -38,9 +38,9 @@ export const gitLoader = (options, globalCallback) => {
.catch(globalCallback)
.then((remote) => remote.fetch([options.branch])
.catch(globalCallback)
.then((number) => {
if (number) {
return globalCallback(`Failed to fetch commit: error number ${number}`);
.then((errorNumber) => {
if (errorNumber) {
return globalCallback(`Failed to fetch commit: error number ${errorNumber}`);
}
console.log(`Cloned ${url} to ${path}`);

@ -1,6 +1,6 @@
"use strict";
var tasks = {};
let tasks = {};
// Code taken from http://stackoverflow.com/a/17204293
// eslint-disable-next-line no-sync

@ -28,7 +28,7 @@ const processPush = (req, res, payload) => {
const processPullRequest = (req, res, payload) => {
const action = payload.action;
const number = payload.number;
const pullRequestNumber = payload.number;
const pullRequest = payload.pull_request;
const head = pullRequest.head;
const headRepo = head.repo;
@ -52,14 +52,14 @@ const processPullRequest = (req, res, payload) => {
"app": req.app,
baseRepoOptions,
headRepoOptions,
number
pullRequestNumber
};
const masterOptions = {
action,
"app": req.app,
baseRepoOptions,
"headRepoOptions": baseRepoOptions,
number
pullRequestNumber
};
console.log(`Got pull request ${action} event, `
@ -97,7 +97,7 @@ const getPayload = (body) => {
}
return JSONParse(body.payload).value;
}
};
export default (req, res) => {
if (!req.body || (!req.body.payload && !req.body.repository)) {

Loading…
Cancel
Save