node-red-contrib-gitlab2
Advanced tools
Comparing version 1.0.0-alpha-06 to 1.0.0-alpha-07
@@ -1,3 +0,1 @@ | ||
const gitlab = require('node-gitlab'); | ||
module.exports = function(RED) { | ||
@@ -7,17 +5,10 @@ function gitlabConfig(n) { | ||
RED.nodes.createNode(node, n); | ||
node.key = n.key; | ||
node.url = n.url; | ||
node.urlFieldType = n.urlFieldType; | ||
node.project_id = n.project_id; | ||
const { credentials } = node; | ||
if (credentials && credentials.hasOwnProperty('key')) { | ||
node.key = credentials.key; | ||
} | ||
node.projectIdFieldType = n.projectIdFieldType; | ||
node.key = n.key; | ||
node.keyFieldType = n.keyFieldType; | ||
} | ||
RED.nodes.registerType('gitlab2-config', gitlabConfig, { | ||
credentials: { | ||
key: { | ||
type: 'password' | ||
} | ||
} | ||
}); | ||
RED.nodes.registerType('gitlab2-config', gitlabConfig); | ||
}; |
@@ -25,6 +25,6 @@ function getNodeField(node, kind, field, RED, msg) { | ||
function getNodeConfig(node, RED, msg) { | ||
const { key, url, projectId } = node.config; | ||
const { key, url, projectId, keyFieldType, urlFieldType, projectIdFieldType } = node.config; | ||
return { | ||
privateToken: getNodeField(node, nameFieldType, key, RED, msg), | ||
api: getNodeField(node, hostFieldType, url, RED, msg), | ||
privateToken: getNodeField(node, keyFieldType, key, RED, msg), | ||
api: getNodeField(node, urlFieldType, url, RED, msg), | ||
id: getNodeField(node, projectIdFieldType, projectId, RED, msg) | ||
@@ -31,0 +31,0 @@ }; |
{ | ||
"name": "node-red-contrib-gitlab2", | ||
"version": "1.0.0-alpha-06", | ||
"version": "1.0.0-alpha-07", | ||
"description": "Node-RED node using GitLab APIs", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22656
167