/** * Git Node - Version 1 * Control git. */ export interface GitV1Params { /** * The way to authenticate * @displayOptions.show { operation: ["clone", "push"] } * @default none */ authentication?: 'gitPassword' | 'none' | Expression; operation?: 'add' | 'addConfig' | 'clone' | 'commit' | 'fetch' | 'listConfig' | 'log' | 'pull' | 'push' | 'pushTags' | 'reflog' | 'status' | 'switchBranch' | 'tag' | 'userSetup'; /** * Local path of the git repository to operate on * @displayOptions.hide { operation: ["clone"] } */ repositoryPath?: string | Expression | PlaceholderValue; /** * Comma-separated list of paths (absolute or relative to Repository Path) of files or folders to add * @displayOptions.show { operation: ["add"] } */ pathsToAdd?: string | Expression | PlaceholderValue; /** * Name of the key to set * @displayOptions.show { operation: ["addConfig"] } */ key?: string | Expression | PlaceholderValue; /** * Value of the key to set * @displayOptions.show { operation: ["addConfig"] } */ value?: string | Expression | PlaceholderValue; /** * Options * @displayOptions.show { operation: ["addConfig"] } * @default {} */ options?: { /** Append setting rather than set it in the local config * @default set */ mode?: 'append' | 'set' | Expression; /** The branch to switch to before committing. If empty or not set, will commit to current branch. */ branch?: string | Expression | PlaceholderValue; /** Comma-separated list of paths (absolute or relative to Repository Path) of files or folders to commit. If not set will all "added" files and folders be committed. */ pathsToAdd?: string | Expression | PlaceholderValue; /** The path (absolute or relative to Repository Path) of file or folder to get the history of * @default README.md */ file?: string | Expression | PlaceholderValue; /** The URL or path of the repository to push to */ targetRepository?: string | Expression | PlaceholderValue; /** The reference to show the reflog for (e.g., HEAD, branch name). Leave empty for HEAD. */ reference?: string | Expression | PlaceholderValue; /** Whether to create the branch if it does not exist * @default true */ createBranch?: boolean | Expression; /** The commit/branch/tag to create the new branch from. If not set, creates from current HEAD. * @displayOptions.show { createBranch: [true] } */ startPoint?: string | Expression | PlaceholderValue; /** Whether to force the branch switch, discarding any local changes * @default false */ force?: boolean | Expression; /** Whether to set up tracking to a remote branch when creating a new branch * @displayOptions.show { createBranch: [true] } * @default false */ setUpstream?: boolean | Expression; /** The name of the remote to track * @displayOptions.show { createBranch: [true], setUpstream: [true] } * @default origin */ remoteName?: string | Expression | PlaceholderValue; }; /** * The URL or path of the repository to clone * @displayOptions.show { operation: ["clone"] } */ sourceRepository?: string | Expression | PlaceholderValue; /** * The commit message to use * @displayOptions.show { operation: ["commit"] } */ message?: string | Expression | PlaceholderValue; /** * Whether to return all results or only up to a given limit * @displayOptions.show { operation: ["log"] } * @default false */ returnAll?: boolean | Expression; /** * Max number of results to return * @displayOptions.show { operation: ["log"], returnAll: [false] } * @default 100 */ limit?: number | Expression; /** * The name of the branch to switch to * @displayOptions.show { operation: ["switchBranch"] } */ branchName?: string | Expression | PlaceholderValue; /** * The name of the tag to create * @displayOptions.show { operation: ["tag"] } */ name?: string | Expression | PlaceholderValue; } export interface GitV1Credentials { gitPassword: CredentialReference; } interface GitV1NodeBase { type: 'n8n-nodes-base.git'; version: 1; credentials?: GitV1Credentials; } export type GitV1ParamsNode = GitV1NodeBase & { config: NodeConfig; }; export type GitV1Node = GitV1ParamsNode;