From 9f17d42a8ae82e41f7286bf826a61dd8292ad98a Mon Sep 17 00:00:00 2001 From: Utkarsh Shigihalli Date: Sat, 9 Mar 2019 19:10:54 +0000 Subject: [PATCH] gitlab commit trigger --- .gitignore | 3 ++- .vscode/settings.json | 9 +++++++-- vss-extension.json | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e95afe9..488d24f 100644 --- a/.gitignore +++ b/.gitignore @@ -69,4 +69,5 @@ node_modules *.js.map *.env .cache -dist/ \ No newline at end of file +dist/ +**/*.rest \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 7401923..501fadf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,11 @@ "**/.DS_Store": true, "**/*.js.map": true, "**/*.taskkey": true, - "**/*.js": { "when": "$(basename).ts"} - } + "**/*.js": { + "when": "$(basename).ts" + } + }, + "workbench.colorCustomizations": { + "tab.activeBorder": "#ff0000", + }, } \ No newline at end of file diff --git a/vss-extension.json b/vss-extension.json index 8ea7e0d..b14b5a9 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -280,10 +280,44 @@ "target": "artifactItems", "dataSourceName": "Artifacts", "resultTemplate": "{ Value : \"{{{path}}}\", DisplayValue : \"{{{path}}}\", data: { itemType: \"{{ #stringReplace ['tree','blob'] ['folder','file'] type }}\" } }" + }, + { + "target": "listwebhook", + "endpointUrl": "{{{endpoint.url}}}projects/{{definition}}/hooks", + "requestVerb": "Post", + "requestContent": "{}", + "resultSelector": "jsonpath:$" + }, + { + "target": "createwebhook", + "endpointUrl": "{{{endpoint.url}}}projects/{{definition}}/hooks?url={{payloadUrl}}", + "requestVerb": "Post", + "requestContent": "{}", + "resultSelector": "jsonpath:$" + }, + { + "target": "deletewebhook", + "endpointUrl": "{{{endpoint.url}}}projects/{{definition}}/hooks/{{hookid}}", + "requestVerb": "Post", + "requestContent": "{}", + "resultSelector": "jsonpath:$" } ], "browsableArtifactTypeMapping": { "folder": "artifactItems" + }, + "ArtifactTriggerConfiguration": { + "isTriggerSupported": true, + "isTriggerSupportedOnlyInHosted": false, + "isWebhookSupportedAtServerLevel": false, + "resources": { + "TriggerDisabledMessage": "Enabling the trigger will create a new release every time a new commit is made in the selected repository and the branch" + }, + "payloadHashHeaderName": "X-GitLab-Token", + "webhookPayloadMapping": { + "version": "{{id}}", + "definition": "{{name}}" + } } } }