Skip to content

Commit

Permalink
Automatic code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawnnypoo committed Oct 25, 2017
1 parent 8a518f6 commit 9198161
Show file tree
Hide file tree
Showing 14 changed files with 765 additions and 620 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"keywords": [
"node",
"glitch",
"express"
"skyhook",
"discord"
],
"devDependencies": {
"chai": "^3.5.0",
Expand Down
2 changes: 1 addition & 1 deletion providers/bintray.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Bintray extends BaseProvider {
title: this.body.package + ' v' + this.body.version + ' Released',
timestamp: this.body.released
};
if(this.body.release_notes != null && this.body.release_notes){
if (this.body.release_notes != null && this.body.release_notes) {
embed.fields = [
{
name: 'Release Notes',
Expand Down
4 changes: 2 additions & 2 deletions providers/bitbucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ class BitBucket extends BaseProvider {
}

static _titleCase(str) {
if(str.length < 1) {
if (str.length < 1) {
return str;
}
str = str.toLowerCase().split(' ');
for (let i = 0; i < str.length; i++) {
str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1);
str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1);
}
return str.join(' ');
}
Expand Down
11 changes: 6 additions & 5 deletions providers/vsts.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class VSTS extends BaseProvider {
this.fields.push({
name: "Commit from " + this.body.resource.pushedBy.displayName,
value: "([`" + commit.commitId.substring(0, 7) + "`](" +
this.body.resource.repository.remoteUrl + "/commit/" + commit.commitId + ")) " + commit.comment,
this.body.resource.repository.remoteUrl + "/commit/" + commit.commitId + ")) " + commit.comment,
inline: false
});
}
Expand All @@ -64,7 +64,7 @@ class VSTS extends BaseProvider {
this.fields.push({
name: "Check in from " + this.user.name,
value: "([`" + this.body.resource.changesetId + "`](" +
this.body.resource.url + ")) " + this.body.resource.comment,
this.body.resource.url + ")) " + this.body.resource.comment,
inline: false
});
this.addMinimalMessage();
Expand All @@ -79,7 +79,7 @@ class VSTS extends BaseProvider {
this.fields.push({
name: "Pull Request from " + this.body.resource.createdBy.displayName,
value: "([`" + this.body.resource.title + "`](" +
this.body.resource.repository.remoteUrl + ")) " + this.body.resource.description,
this.body.resource.repository.remoteUrl + ")) " + this.body.resource.description,
inline: false
});
this.addMinimalMessage();
Expand All @@ -94,7 +94,7 @@ class VSTS extends BaseProvider {
this.fields.push({
name: "Pull Request Merge Commit from " + this.body.resource.createdBy.displayName,
value: "([`" + this.body.resource.title + "`](" +
this.body.resource.repository.remoteUrl + ")) " + this.body.resource.description,
this.body.resource.repository.remoteUrl + ")) " + this.body.resource.description,
inline: false
});
this.addMinimalMessage();
Expand All @@ -109,7 +109,7 @@ class VSTS extends BaseProvider {
this.fields.push({
name: "Pull Request Updated by " + this.body.resource.createdBy.displayName,
value: "([`" + this.body.resource.title + "`](" +
this.body.resource.repository.remoteUrl + ")) " + this.body.resource.description,
this.body.resource.repository.remoteUrl + ")) " + this.body.resource.description,
inline: false
});
this.addMinimalMessage();
Expand Down Expand Up @@ -153,6 +153,7 @@ class VSTS extends BaseProvider {
async msVssReleaseReleaseCreatedEvent() {
this.addMinimalMessage();
}

//RELEASE ABANDONED
async msVssReleaseReleaseAbandonedEvent() {
this.addMinimalMessage();
Expand Down
4 changes: 2 additions & 2 deletions test/codacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const json = {
"delta": "https://www.codacy.com/public/jquery/jquery.git/commit?bid=21776&cid=6037089"
}
},
"results":{
"results": {
"fixed_count": 1,
"new_count": 0
}
}
};
};

/*
* Test the /POST route
Expand Down
26 changes: 13 additions & 13 deletions test/gitlab.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ const pushJson = {
* Test the /POST route
*/
describe('/POST gitlab', () => {
it('gitlab push', (done) => {
chai.request(server)
.post('/api/webhooks/test/test/gitlab')
.set("test", "true")
.send(pushJson)
.end((err, res) => {
res.should.have.status(200);
console.log(res.body);
res.body.should.be.a('object');
res.body.should.have.property('embeds');
done();
});
});
it('gitlab push', (done) => {
chai.request(server)
.post('/api/webhooks/test/test/gitlab')
.set("test", "true")
.send(pushJson)
.end((err, res) => {
res.should.have.status(200);
console.log(res.body);
res.body.should.be.a('object');
res.body.should.have.property('embeds');
done();
});
});
});
26 changes: 13 additions & 13 deletions test/heroku.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ chai.use(chaiHttp);
* Test the /POST route
*/
describe('/POST heroku', () => {
it('deploy', (done) => {
chai.request(server)
.post('/api/webhooks/test/test/heroku')
.set("test", "true")
.send({app: 'test', user: '[email protected]', url: 'https://www.example.com'})
.end((err, res) => {
res.should.have.status(200);
console.log(res.body);
res.body.should.be.a('object');
res.body.should.have.property('embeds');
done();
});
});
it('deploy', (done) => {
chai.request(server)
.post('/api/webhooks/test/test/heroku')
.set("test", "true")
.send({app: 'test', user: '[email protected]', url: 'https://www.example.com'})
.end((err, res) => {
res.should.have.status(200);
console.log(res.body);
res.body.should.be.a('object');
res.body.should.have.property('embeds');
done();
});
});
});
Loading

0 comments on commit 9198161

Please sign in to comment.