refactor(core): Add more overloads for string-type node parameters (no-changelog) (#5101)

* refactor(core): Add more overloads for string-type node parameter (no-changelog)

continued from https://github.com/n8n-io/n8n/pull/4797

* include binaryPropertyOutput
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-06 15:09:32 +01:00
committed by GitHub
parent c97f3cad59
commit 1acc7fea89
53 changed files with 98 additions and 131 deletions

View File

@@ -1687,7 +1687,7 @@ export class Github implements INodeType {
requestMethod = 'PUT';
const filePath = this.getNodeParameter('filePath', i) as string;
const filePath = this.getNodeParameter('filePath', i);
const additionalParameters = this.getNodeParameter(
'additionalParameters',
@@ -1731,7 +1731,7 @@ export class Github implements INodeType {
});
}
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string;
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
if (item.binary[binaryPropertyName] === undefined) {
throw new NodeOperationError(
@@ -1778,7 +1778,7 @@ export class Github implements INodeType {
body.branch = (additionalParameters.branch as IDataObject).branch;
}
const filePath = this.getNodeParameter('filePath', i) as string;
const filePath = this.getNodeParameter('filePath', i);
body.message = this.getNodeParameter('commitMessage', i) as string;
body.sha = await getFileSha.call(
@@ -1793,7 +1793,7 @@ export class Github implements INodeType {
} else if (operation === 'get') {
requestMethod = 'GET';
const filePath = this.getNodeParameter('filePath', i) as string;
const filePath = this.getNodeParameter('filePath', i);
const additionalParameters = this.getNodeParameter(
'additionalParameters',
i,
@@ -1806,7 +1806,7 @@ export class Github implements INodeType {
endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`;
} else if (operation === 'list') {
requestMethod = 'GET';
const filePath = this.getNodeParameter('filePath', i) as string;
const filePath = this.getNodeParameter('filePath', i);
endpoint = `/repos/${owner}/${repository}/contents/${encodeURI(filePath)}`;
}
} else if (resource === 'issue') {
@@ -2117,7 +2117,7 @@ export class Github implements INodeType {
});
}
// Add the returned data to the item as binary property
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i) as string;
const binaryPropertyName = this.getNodeParameter('binaryPropertyName', i);
const newItem: INodeExecutionData = {
json: items[i].json,