fix(fix request package usage): update

This commit is contained in:
2018-09-22 14:36:25 +02:00
parent 5d468fc840
commit 5085d664cb
3 changed files with 22 additions and 4 deletions

View File

@ -22,7 +22,20 @@ let evaluateTrigger = async triggerEnvVarArg => {
}
plugins.beautylog.info('Found Trigger!');
plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName);
plugins.request.post('https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds', {
form: { token: regexProjectTriggerToken, ref: regexRefName }
});
plugins.request.postFormData(
'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds',
{},
[
{
name: 'token',
payload: regexProjectTriggerToken,
type: 'string'
},
{
name: 'ref',
payload: regexRefName,
type: 'string'
}
]
);
};