screwdriver-data-schema 25.2.0 → 25.3.0
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/config/regex.js +2 -1
- package/core/scm.js +3 -1
- package/models/pipeline.js +5 -4
- package/package.json +1 -1
package/config/regex.js
CHANGED
|
@@ -71,13 +71,14 @@ module.exports = {
|
|
|
71
71
|
|
|
72
72
|
// Can be ~pr, ~commit, ~release, ~tag or ~commit:branchName, or ~sd@123:component
|
|
73
73
|
// Note: if you modify this regex, you must modify `sdJoi` definition in the `config/job.js`
|
|
74
|
-
TRIGGER: /^~?(sd@\d+:[\w-]+|(pr|commit|release|tag|subscribe)(:(.+))?)$/,
|
|
74
|
+
TRIGGER: /^~?(sd@\d+:[\w-]+|(pr|pr-closed|commit|release|tag|subscribe)(:(.+))?)$/,
|
|
75
75
|
// Triggers which always create event
|
|
76
76
|
CORE_TRIGGER: /^~(pr|commit)(:(.+))?$/,
|
|
77
77
|
// Triggers which does not create empty events
|
|
78
78
|
EXTRA_TRIGGER: /^~(release|tag)(:(.+))?$/,
|
|
79
79
|
// Can be ~pr or ~pr:branchName
|
|
80
80
|
PR_TRIGGER: /^~pr(:.+)?$/,
|
|
81
|
+
PR_CLOSED_TRIGGER: /^~pr-(closed)(:.+)?$/,
|
|
81
82
|
// Can be ~commit or ~commit:branchName
|
|
82
83
|
COMMIT_TRIGGER: /^~commit(:.+)?$/,
|
|
83
84
|
// Can be ~release or ~release:branchName
|
package/core/scm.js
CHANGED
|
@@ -185,7 +185,9 @@ const SCHEMA_HOOK = Joi.object()
|
|
|
185
185
|
|
|
186
186
|
modifiedFiles: Joi.array().items(Joi.string().allow('')).optional().label('Modified files of head commit'),
|
|
187
187
|
|
|
188
|
-
removedFiles: Joi.array().items(Joi.string().allow('')).optional().label('Removed files of head commit')
|
|
188
|
+
removedFiles: Joi.array().items(Joi.string().allow('')).optional().label('Removed files of head commit'),
|
|
189
|
+
|
|
190
|
+
prMerged: Joi.boolean().optional().label('Whether the pull request is merged').example(true).default(false)
|
|
189
191
|
})
|
|
190
192
|
.label('SCM Hook');
|
|
191
193
|
|
package/models/pipeline.js
CHANGED
|
@@ -71,8 +71,8 @@ const MODEL = {
|
|
|
71
71
|
adminUserIds: Joi.array()
|
|
72
72
|
.items(Joi.number().integer().positive().description('Identifier of the user').example(12345))
|
|
73
73
|
.description('IDs of the users who have admin privileges for this pipeline')
|
|
74
|
-
.
|
|
75
|
-
.
|
|
74
|
+
.example('[12345, 6789]')
|
|
75
|
+
.default([]),
|
|
76
76
|
|
|
77
77
|
workflowGraph: WorkflowGraph.workflowGraph.description('Graph representation of the workflow'),
|
|
78
78
|
|
|
@@ -160,7 +160,7 @@ module.exports = {
|
|
|
160
160
|
get: Joi.object(
|
|
161
161
|
mutate(
|
|
162
162
|
MODEL,
|
|
163
|
-
['id', 'scmUri', 'scmContext', 'createTime', 'admins', '
|
|
163
|
+
['id', 'scmUri', 'scmContext', 'createTime', 'admins', 'state'],
|
|
164
164
|
[
|
|
165
165
|
'workflowGraph',
|
|
166
166
|
'scmRepo',
|
|
@@ -174,7 +174,8 @@ module.exports = {
|
|
|
174
174
|
'subscribedScmUrlsWithActions',
|
|
175
175
|
'settings',
|
|
176
176
|
'badges',
|
|
177
|
-
'templateVersionId'
|
|
177
|
+
'templateVersionId',
|
|
178
|
+
'adminUserIds'
|
|
178
179
|
]
|
|
179
180
|
)
|
|
180
181
|
).label('Get Pipeline'),
|