Skip to content

Commit

Permalink
added support for GitLab Merge Request IID
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmerwin committed Oct 10, 2019
1 parent 1e09691 commit 2ed185c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -5,4 +5,5 @@ coverage.json
npm-debug.log

# Webstorm IDE
.idea
.idea
.DS_Store
1 change: 1 addition & 0 deletions lib/getOptions.js
Expand Up @@ -79,6 +79,7 @@ var getBaseOptions = function(cb){
options.service_name = 'gitlab-ci';
options.service_job_number = process.env.CI_BUILD_NAME;
options.service_job_id = process.env.CI_BUILD_ID;
options.service_pull_request = process.env.CI_MERGE_REQUEST_IID;
git_commit = process.env.CI_BUILD_REF;
git_branch = process.env.CI_BUILD_REF_NAME;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -5,7 +5,7 @@
"coverage",
"coveralls"
],
"version": "3.0.6",
"version": "3.0.7",
"bugs": {
"url": "https://github.com/nickmerwin/node-coveralls/issues"
},
Expand Down
4 changes: 3 additions & 1 deletion test/getOptions.js
Expand Up @@ -437,9 +437,11 @@ var testGitlab = function(sut, done) {
process.env.CI_BUILD_ID = "1234";
process.env.CI_BUILD_REF = "e3e3e3e3e3e3e3e3e";
process.env.CI_BUILD_REF_NAME = "feature";
process.env.CI_MERGE_REQUEST_IID = "1";
sut(function(err, options){
options.service_name.should.equal("gitlab-ci");
options.service_job_id.should.equal("1234");
options.service_pull_request.should.equal("1");
options.git.should.eql({ head:
{ id: 'e3e3e3e3e3e3e3e3e',
author_name: 'Unknown Author',
Expand Down Expand Up @@ -495,7 +497,7 @@ var testBuildkite = function(sut, done) {
});
};


var testSemaphore = function(sut, done) {
process.env.SEMAPHORE = true;
process.env.SEMAPHORE_BUILD_NUMBER = '1234';
Expand Down

0 comments on commit 2ed185c

Please sign in to comment.