There's a lot of demand for the Gitlab badges (#541) and the PR has been lingering, so I thought I'd start off one of the simple ones as a new-style service. This one is SVG-based, so it shouldn't require the API-token logic which could use some more testing and will require us to create an app and configure it on our server. We don't have any validation in place for `queryParams`. Probably this should be added to BaseService, though for the time being I extracted a helper function. Thanks to @LVMBDV for getting this work started in #1838!
17 lines
209 B
JavaScript
17 lines
209 B
JavaScript
'use strict'
|
|
|
|
const Joi = require('joi')
|
|
|
|
const isPipelineStatus = Joi.equal(
|
|
'pending',
|
|
'running',
|
|
'passed',
|
|
'failed',
|
|
'skipped',
|
|
'canceled'
|
|
).required()
|
|
|
|
module.exports = {
|
|
isPipelineStatus,
|
|
}
|