From 3810039da032ecbd038255316b3d8fa5ce5ef2df Mon Sep 17 00:00:00 2001 From: Bram Kn Date: Tue, 18 Apr 2023 10:19:35 +0200 Subject: [PATCH] feat(GitLab Node): Add Additional parameters for File List (#5621) --- .../nodes-base/nodes/Gitlab/Gitlab.node.ts | 39 +++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index a974bc5c3e..421c5905ca 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -1080,6 +1080,38 @@ export class Gitlab implements INodeType { default: 1, description: 'Page of results to display', }, + { + displayName: 'Additional Parameters', + name: 'additionalParameters', + placeholder: 'Add Parameter', + description: 'Additional fields to add', + type: 'collection', + default: {}, + displayOptions: { + show: { + resource: ['file'], + operation: ['list'], + }, + }, + options: [ + { + displayName: 'Reference', + name: 'ref', + type: 'string', + default: '', + placeholder: 'main', + description: + 'The name of the commit/branch/tag. Default: the repository’s default branch (usually main).', + }, + { + displayName: 'Recursive', + name: 'recursive', + type: 'boolean', + default: false, + description: 'Whether or not to get a recursive file tree. Default is false.', + }, + ], + }, // ---------------------------------- // file:get @@ -1134,9 +1166,9 @@ export class Gitlab implements INodeType { name: 'reference', type: 'string', default: '', - placeholder: 'master', + placeholder: 'main', description: - 'The name of the commit/branch/tag. Default: the repository’s default branch (usually master).', + 'The name of the commit/branch/tag. Default: the repository’s default branch (usually main).', }, ], }, @@ -1635,7 +1667,8 @@ export class Gitlab implements INodeType { requestMethod = 'GET'; const filePath = this.getNodeParameter('filePath', i); - qs = this.getNodeParameter('additionalFields', i, {}); + + qs = this.getNodeParameter('additionalParameters', i, {}) as IDataObject; returnAll = this.getNodeParameter('returnAll', i); if (!returnAll) {