diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1d614e..67fd2eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ mirror: snyk: stage: security script: + - npmci npm prepare - npmci command npm install -g snyk - npmci command npm install --ignore-scripts - npmci command snyk test @@ -39,6 +40,7 @@ snyk: testLEGACY: stage: test script: + - npmci npm prepare - npmci node install legacy - npmci npm install - npmci npm test @@ -51,6 +53,7 @@ testLEGACY: testLTS: stage: test script: + - npmci npm prepare - npmci node install lts - npmci npm install - npmci npm test @@ -62,6 +65,7 @@ testLTS: testSTABLE: stage: test script: + - npmci npm prepare - npmci node install stable - npmci npm install - npmci npm test @@ -118,6 +122,7 @@ pages: stage: metadata script: - npmci command npm install -g typedoc typescript + - npmci npm prepare - npmci npm install - npmci command typedoc --module "commonjs" --target "ES2016" --out public/ ts/ tags: diff --git a/package.json b/package.json index 6c79bd2..03d361c 100644 --- a/package.json +++ b/package.json @@ -53,4 +53,4 @@ "through2": "^2.0.3" }, "private": false -} +} \ No newline at end of file diff --git a/ts/mod_trigger/index.ts b/ts/mod_trigger/index.ts index fd7f4e1..705ce63 100644 --- a/ts/mod_trigger/index.ts +++ b/ts/mod_trigger/index.ts @@ -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' + } + ] + ); };