diff --git a/README.md b/README.md index adbb6f1..6dfb8c3 100644 --- a/README.md +++ b/README.md @@ -347,10 +347,10 @@ The parameters required are: | config.scmContext | String | No | The name of scm context | #### Expected Outcome -The object consists of PR name, sha and ref for the pipeline. +The object consists of PR name, sha, ref, and url for the pipeline. #### Expected Promise Response -1. Resolve with the object consists of PR name, sha and ref +1. Resolve with the object consists of PR name, sha, ref, and url 2. Reject if the input or output is not valid ### getScmContexts diff --git a/index.js b/index.js index 2705d19..b6c5fc1 100644 --- a/index.js +++ b/index.js @@ -358,7 +358,8 @@ class ScmBase { .then(pr => validate(pr, Joi.object().keys({ name: Joi.reach(dataSchema.models.job.base, 'name').required(), sha: Joi.reach(dataSchema.models.build.base, 'sha').required(), - ref: Joi.string().required() + ref: Joi.string().required(), + url: Joi.reach(dataSchema.core.scm.pr, 'url') }))); }