screwdriver-api 8.0.206 → 8.0.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "8.0.206",
3
+ "version": "8.0.207",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -232,6 +232,12 @@ async function createEvent(config) {
232
232
  } = config;
233
233
 
234
234
  const pipeline = await pipelineFactory.get(pipelineId);
235
+
236
+ if (pipeline.state !== 'ACTIVE') {
237
+ // INACTIVE, DELETING, or DISABLED pipeline
238
+ throw boom.badRequest(`Cannot create an event for a(n) ${pipeline.state} pipeline`);
239
+ }
240
+
235
241
  const realAdmin = await pipeline.admin;
236
242
  const { scmContext, scmUri } = pipeline;
237
243