File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ export interface RequestOptions {
183
183
search ?: string ;
184
184
public ?: boolean ;
185
185
text ?: string ;
186
+ token ?: string ;
186
187
}
187
188
188
189
class RequestHelper {
Original file line number Diff line number Diff line change @@ -33,6 +33,15 @@ class Triggers extends BaseService {
33
33
34
34
return RequestHelper . get ( this , `projects/${ pId } /triggers/${ tId } ` ) ;
35
35
}
36
+
37
+ pipeline ( projectId : ProjectId , options : RequestOptions ) {
38
+ if ( ! options . ref ) throw new Error ( 'Missing required property: ref' ) ;
39
+ if ( ! options . token ) throw new Error ( 'Missing required property: token' ) ;
40
+
41
+ const pId = encodeURIComponent ( projectId ) ;
42
+
43
+ return RequestHelper . post ( this , `projects/${ pId } /trigger/pipeline` , options ) ;
44
+ }
36
45
}
37
46
38
47
export default Triggers ;
You can’t perform that action at this time.
0 commit comments