Skip to content

Commit

Permalink
More code formatting, removing useless debug blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
hollywood committed Jun 28, 2018
1 parent 0565ef2 commit 0cc967f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/RemoveOutsideCollaborators.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const yaml = require('js-yaml')
const noOrgConfig = false
process.on('uncaughtException', function (err) {
console.error(err);
console.log("Node NOT Exiting...");
});

class RemoveOutsideCollaborators {

Expand All @@ -21,10 +17,10 @@ class RemoveOutsideCollaborators {
}))
.then((orgConfig) => {
if ('noOrgConfig' in orgConfig) {
return new RemoveOutsideCollaborators(github, repo, payload, logger, '').update()
return new RemoveOutsideCollaborators(github, repo, payload, logger, '').update()
} else {
const content = Buffer.from(orgConfig.data.content, 'base64').toString()
return new RemoveOutsideCollaborators(github, repo, payload, logger, content).update()
return new RemoveOutsideCollaborators(github, repo, payload, logger, content).update()
}
})
}
Expand All @@ -44,7 +40,7 @@ class RemoveOutsideCollaborators {
}

executeWorkflow() {
var configParams = Object.assign({}, require('./defaults'), this.config || {})
var configParams = Object.assign({}, require('./defaults'), this.config || {})

if (this.isRemoveCollaboratorsDisabled(configParams.enableCollaboratorRemoval, configParams.monitorOnly)) return

Expand All @@ -65,7 +61,9 @@ class RemoveOutsideCollaborators {
}
const toOrgParams = Object.assign({}, orgParams || {})

this.github.orgs.checkMembership(toOrgParams).then(({ data }) => {
this.github.orgs.checkMembership(toOrgParams).then(({
data
}) => {
return isMember === 'pending' ? false : true
}).catch(() => {
this.executeWorkflow()
Expand Down

0 comments on commit 0cc967f

Please sign in to comment.