diff --git a/build.js b/build.js index 4dc5714..f21fa8d 100644 --- a/build.js +++ b/build.js @@ -131,7 +131,8 @@ Build.prototype.getter = function (repo, branch, cb) { repo_dir: self.build_manager.config.repo_dir, output: self.build_manager.config.processing, repo: repo, - branch: branch + branch: branch, + url: self.ui.get_url ? self.ui.get_url : '' }); self.run_command(command, cb); diff --git a/parser.js b/parser.js index 642e3f5..4708c0d 100644 --- a/parser.js +++ b/parser.js @@ -31,6 +31,11 @@ var GitHub = (function () { gh_parser.prototype.extract = function () { if (!(this.payload.repository && this.payload.repository.full_name && + this.payload.repository.url && + this.payload.head_commit && + this.payload.head_commit.message && + this.payload.sender && + this.payload.sender.avatar_url && this.payload.ref)) { return undefined; } @@ -76,10 +81,11 @@ var GitLab = (function () { } return (this.data = { - slug: slug, - branch: this.payload.ref.replace(/^refs\/heads\//, ''), - url: this.payload.repository.homepage, - commit: this.payload.total_commits_count > 0 ? this.payload.commits.slice(-1).message : undefined + slug: slug, + branch: this.payload.ref.replace(/^refs\/heads\//, ''), + url: this.payload.repository.homepage, + get_url: this.payload.repository.git_ssh_url, + commit: this.payload.total_commits_count > 0 ? this.payload.commits.slice(-1).message : undefined }); };