mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
Add missing method for triggering pipelines
[Triggering pipelines through the API](https://docs.gitlab.com/ee/ci/triggers/)
This commit is contained in:
parent
8f551f1054
commit
b140253bdb
@ -33,6 +33,15 @@ class Triggers extends BaseService {
|
||||
|
||||
return RequestHelper.get(this, `projects/${pId}/triggers/${tId}`);
|
||||
}
|
||||
|
||||
pipeline(projectId: ProjectId, options: RequestOptions) {
|
||||
if(!options.ref) throw new Error('Missing required property: ref');
|
||||
if(!options.token) throw new Error('Missing required property: token');
|
||||
|
||||
const pId = encodeURIComponent(projectId);
|
||||
|
||||
return RequestHelper.post(this, `projects/${pId}/trigger/pipeline`, options);
|
||||
}
|
||||
}
|
||||
|
||||
export default Triggers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user