Skip to content

Commit

Permalink
Merge pull request #144 from screwdriver-cd/pipelineId
Browse files Browse the repository at this point in the history
fix: allow pipelineId in updateCommitStatus
  • Loading branch information
minzcmu authored Jun 9, 2017
2 parents 12a06cb + 8343f66 commit f7cbe8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/scm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const jobName = Joi.reach(models.job.base, 'name').optional();
const username = Joi.reach(models.user.base, 'username').required();
const checkoutUrl = Joi.reach(models.pipeline.create, 'checkoutUrl').required();
const prNum = Joi.reach(core.scm.hook, 'prNum').allow(null).optional();
const pipelineId = Joi.reach(models.pipeline.base, 'id').optional();

const ADD_WEBHOOK = Joi.object().keys({
scmUri,
Expand Down Expand Up @@ -49,7 +50,8 @@ const UPDATE_COMMIT_STATUS = Joi.object().keys({
sha,
buildStatus,
jobName,
url: Joi.string().uri().required()
url: Joi.string().uri().required(),
pipelineId
}).required();

const GET_FILE = Joi.object().keys({
Expand Down
1 change: 1 addition & 0 deletions test/data/scm.updateCommitStatus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ sha: 46f1a0bd5592a2f9244ca321b129902a06b53e03
buildStatus: SUCCESS
jobName: main
url: https://foo.bar
pipelineId: 123

0 comments on commit f7cbe8e

Please sign in to comment.