screwdriver-api 4.1.283 → 4.1.286
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
|
@@ -41,7 +41,7 @@ module.exports = () => ({
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
await Promise.
|
|
44
|
+
const createEvents = await Promise.allSettled(
|
|
45
45
|
pipelines.map(async p => {
|
|
46
46
|
const pipelineToken = await p.token;
|
|
47
47
|
const pipelineScmContext = p.scmContext;
|
|
@@ -51,6 +51,8 @@ module.exports = () => ({
|
|
|
51
51
|
token: pipelineToken
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
await getUserPermissions({ user, scmUri: p.scmUri, level: 'push' });
|
|
55
|
+
|
|
54
56
|
await eventFactory.create({
|
|
55
57
|
pipelineId: p.id,
|
|
56
58
|
sha,
|
|
@@ -62,6 +64,12 @@ module.exports = () => ({
|
|
|
62
64
|
})
|
|
63
65
|
);
|
|
64
66
|
|
|
67
|
+
const rejected = createEvents.filter(createEvent => createEvent.status === 'rejected');
|
|
68
|
+
|
|
69
|
+
if (rejected.length) {
|
|
70
|
+
throw boom.forbidden('Failed to start some child pipelines due to lack of permissions.');
|
|
71
|
+
}
|
|
72
|
+
|
|
65
73
|
return h.response().code(201);
|
|
66
74
|
},
|
|
67
75
|
validate: {
|