This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit edb1dee15d30e51d807ebff1256ac1d4bcf422d6 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Nov 27 15:04:09 2026 +0100 CAMEL-23832: camel-git - improve the component and option descriptions This commit rewrites the component description and the texts of 13 endpoint options and 12 headers of git. The new texts say which operations and which consumer type read each value, what JGit does by default, and which header replaces an option. The old texts did not say that branchName is checked out first by most operations, that CamelGitFilename is also used by remove, or that the commit username and email set the author as well. Documentation only, no behavior change. The component JSON, the catalog copy, the doc page header and the DSL are regenerated. camel-git is marked as done in tasks/component-descriptions.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../org/apache/camel/catalog/components/git.json | 52 +++---- .../apache/camel/catalog/docs/git-component.adoc | 2 +- .../org/apache/camel/component/git/git.json | 52 +++---- .../camel-git/src/main/docs/git-component.adoc | 2 +- .../apache/camel/component/git/GitConstants.java | 49 +++++-- .../apache/camel/component/git/GitEndpoint.java | 100 ++++++------- .../component/ComponentsBuilderFactory.java | 3 +- .../component/dsl/GitComponentBuilderFactory.java | 6 +- .../builder/endpoint/EndpointHeaderBuilders.java | 3 +- .../builder/endpoint/StaticEndpointBuilders.java | 14 +- .../endpoint/dsl/GitEndpointBuilderFactory.java | 161 +++++++++++++++------ tasks/component-descriptions.md | 2 +- 12 files changed, 272 insertions(+), 174 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/git.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/git.json index 5992afb34acb..a2897c9ff7e3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/git.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/git.json @@ -3,7 +3,7 @@ "kind": "component", "name": "git", "title": "Git", - "description": "Perform operations on git repositories.", + "description": "Run git operations, such as clone, commit, push and pull, on a local repository with JGit, and receive its commits, branches and tags.", "deprecated": false, "firstVersion": "2.16.0", "label": "file", @@ -31,19 +31,19 @@ "healthCheckProducerEnabled": { "index": 4, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer [...] }, "headers": { - "CamelGitOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation to do on a repository, if not specified as endpoint option", "constantName": "org.apache.camel.component.git.GitConstants#GIT_OPERATION" }, - "CamelGitFilename": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The file name in an add operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_FILE_NAME" }, - "CamelGitCommitMessage": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit message related in a commit operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_MESSAGE" }, - "CamelGitCommitUsername": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit username in a commit operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_USERNAME" }, - "CamelGitCommitEmail": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit email in a commit operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_EMAIL" }, + "CamelGitOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation that the producer performs, used only when the operation option is not set.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_OPERATION" }, + "CamelGitFilename": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The path of the file to stage (add) or to remove from the index and the working tree (remove), relative to the root of the working tree with \/ as separator. A directory stands for all the files below it, and file globs are not supported. Required by add and r [...] + "CamelGitCommitMessage": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The message of the new commit in commit and commitAll. Required by both.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_MESSAGE" }, + "CamelGitCommitUsername": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the author and committer of the new commit in commit and commitAll. Used only together with CamelGitCommitEmail. Without both, JGit takes them from user.name and user.email of the git config.", "constantName": "org.apache.camel.component.git. [...] + "CamelGitCommitEmail": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The email of the author and committer of the new commit in commit and commitAll. Used only together with CamelGitCommitUsername.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_EMAIL" }, "CamelGitCommitId": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit id (the sha): of the commit consumed by the commit consumer, of the commit to cherry pick in a cherryPick operation, and of the new commit after a commit or commitAll operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_ID" }, - "CamelGitAllowEmpty": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "The flag to manage empty git commits", "constantName": "org.apache.camel.component.git.GitConstants#GIT_ALLOW_EMPTY" }, - "CamelGitAuthorName": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The author name", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_AUTHOR_NAME" }, - "CamelGitCommiterName": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The committer name", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_COMMITTER_NAME" }, - "CamelGitCommitTime": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The commit time", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_TIME" }, - "CamelGitBranchName": { "index": 10, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The branch\/tag name", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_NAME" }, - "CamelGitBranchLeaf": { "index": 11, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The leaf", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_LEAF" }, - "CamelGitBranchObjectId": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The object id", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_OBJECT_ID" } + "CamelGitAllowEmpty": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Whether commit and commitAll create a commit when there is nothing to commit. Replaces the allowEmpty option.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_ALLOW_EMPTY" }, + "CamelGitAuthorName": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the author of the consumed commit.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_AUTHOR_NAME" }, + "CamelGitCommiterName": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the committer of the consumed commit.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_COMMITTER_NAME" }, + "CamelGitCommitTime": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The commit time of the consumed commit, in seconds since 1970-01-01T00:00:00Z.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_TIME" }, + "CamelGitBranchName": { "index": 10, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The full name of the consumed ref, such as refs\/heads\/main, refs\/remotes\/origin\/main or refs\/tags\/v1. The branch and tag consumers set it and also put it in the body.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_NAME" }, + "CamelGitBranchLeaf": { "index": 11, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The full name of the ref that the consumed ref points to in the end, when it is a symbolic ref such as refs\/remotes\/origin\/HEAD. For any other ref it is the same as CamelGitBranchName.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BR [...] + "CamelGitBranchObjectId": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of the object that the consumed ref points to: a commit for a branch or a lightweight tag, a tag object for an annotated tag.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_OBJECT_ID" } }, "bodyTypes": { "consumerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "description": "The full message of the commit with type=commit, the name of the ref, such as refs\/heads\/main or refs\/tags\/v1, with type=branch and tag. The commit id, author, committer and time, or the object id of the ref, are in headers" }, @@ -51,23 +51,23 @@ "producerOut": { "carriers": [ "unchanged", "pojo", "list", "iterator", "map" ], "byOption": [ { "option": "operation", "value": "status", "carriers": [ "pojo" ], "javaType": "org.eclipse.jgit.api.Status" }, { "option": "operation", "value": "log", "carriers": [ "iterator" ], "javaType": "org.eclipse.jgit.revwalk.RevWalk" }, { "option": "operation", "value": "push", "carriers": [ "list" ] }, { "option": "operation", "value": "pushTag", "carriers": [ "list" ] }, { "option": "operation [...] }, "properties": { - "localPath": { "index": 0, "kind": "path", "displayName": "Local Path", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Local repository path" }, - "branchName": { "index": 1, "kind": "parameter", "displayName": "Branch Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The branch name to work on" }, + "localPath": { "index": 0, "kind": "path", "displayName": "Local Path", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The path of the working tree of the local repository, the directory that holds the .git directory. The clone operation creates the repository there and fails if the directory exists, and init creates it there." }, + "branchName": { "index": 1, "kind": "parameter", "displayName": "Branch Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the branch. The commit consumer receives the commits reachable from it, or the commits of all refs when it is not set or not found. For the producer it is the branch to create or delete, to check out (clone and checkout, w [...] "sendEmptyMessageWhenIdle": { "index": 2, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, - "type": { "index": 3, "kind": "parameter", "displayName": "Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.git.consumer.GitType", "enum": [ "commit", "tag", "branch" ], "deprecated": false, "autowired": false, "secret": false, "description": "The consumer type" }, + "type": { "index": 3, "kind": "parameter", "displayName": "Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.git.consumer.GitType", "enum": [ "commit", "tag", "branch" ], "deprecated": false, "autowired": false, "secret": false, "description": "What the consumer receives: commit for each commit, tag for each tag, or branch for each local and remote-tracking branch. Required for the consumer. It receives all the [...] "bridgeErrorHandler": { "index": 4, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] "exceptionHandler": { "index": 5, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...] "exchangePattern": { "index": 6, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "index": 7, "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the pol [...] - "allowEmpty": { "index": 8, "kind": "parameter", "displayName": "Allow Empty", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "The flag to manage empty git commits" }, - "depth": { "index": 9, "kind": "parameter", "displayName": "Depth", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Clone depth for shallow clones. Must be a positive integer. A value of 1 fetches only the latest commit. When set to 0 or not specified, a full clone is performed." }, - "operation": { "index": 10, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "add", "checkout", "cherryPick", "clean", "clone", "commit", "commitAll", "createBranch", "createTag", "deleteBranch", "deleteTag", "gc", "init", "log", "merge", "pull", "push", "pushTag", "remoteAdd", "remoteList", "remove", "showBranches", "showTags", "status" ], "deprecated": false, "auto [...] - "remoteName": { "index": 11, "kind": "parameter", "displayName": "Remote Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The remote repository name to use in particular operation like pull" }, - "remotePath": { "index": 12, "kind": "parameter", "displayName": "Remote Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The remote repository path" }, - "tagName": { "index": 13, "kind": "parameter", "displayName": "Tag Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The tag name to work on" }, - "targetBranchName": { "index": 14, "kind": "parameter", "displayName": "Target Branch Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "master", "description": "Name of target branch in merge operation. If not supplied will try to use init.defaultBranch git configs. If not configured will use default value" }, + "allowEmpty": { "index": 8, "kind": "parameter", "displayName": "Allow Empty", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether commit and commitAll create a commit when there is nothing to commit. If false, they fail with the EmptyCommitException of JGit instead, as git commit does without --allow-empty. The CamelGitAllowEmpty [...] + "depth": { "index": 9, "kind": "parameter", "displayName": "Depth", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The depth of a shallow clone in the clone operation, as the number of commits of history to fetch. For example, 1 fetches only the latest commit. The default 0 makes a full clone, and a negative value fails the clone." }, + "operation": { "index": 10, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "add", "checkout", "cherryPick", "clean", "clone", "commit", "commitAll", "createBranch", "createTag", "deleteBranch", "deleteTag", "gc", "init", "log", "merge", "pull", "push", "pushTag", "remoteAdd", "remoteList", "remove", "showBranches", "showTags", "status" ], "deprecated": false, "auto [...] + "remoteName": { "index": 11, "kind": "parameter", "displayName": "Remote Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the remote, such as origin, that pull, push and pushTag use and that remoteAdd adds. Required by these operations." }, + "remotePath": { "index": 12, "kind": "parameter", "displayName": "Remote Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The URL of the remote repository, such as https:\/\/github.com\/apache\/camel.git. The clone operation clones it, and remoteAdd adds it as the remote named remoteName." }, + "tagName": { "index": 13, "kind": "parameter", "displayName": "Tag Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the tag for createTag, which creates an annotated tag of HEAD, and for deleteTag and pushTag. For checkout, the tag that the new branchName branch starts from." }, + "targetBranchName": { "index": 14, "kind": "parameter", "displayName": "Target Branch Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "master", "description": "The branch that the merge operation checks out and merges branchName into. If not set, merge uses init.defaultBranch of the user git config, or master when that is not set either." }, "lazyStartProducer": { "index": 15, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...] - "gitConfigFile": { "index": 16, "kind": "parameter", "displayName": "Git Config File", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "A String with path to a .gitconfig file" }, + "gitConfigFile": { "index": 16, "kind": "parameter", "displayName": "Git Config File", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The git config file to read in place of the user git config (\/.gitconfig), as a URI with the classpath:, file:, http: or https: scheme. When it is set, the system git config is not read." }, "backoffErrorThreshold": { "index": 17, "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, "backoffIdleThreshold": { "index": 18, "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, "backoffMultiplier": { "index": 19, "kind": "parameter", "displayName": "Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is h [...] @@ -83,7 +83,7 @@ "startScheduler": { "index": 29, "kind": "parameter", "displayName": "Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started." }, "timeUnit": { "index": 30, "kind": "parameter", "displayName": "Time Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "enum", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and delay options." }, "useFixedDelay": { "index": 31, "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." }, - "password": { "index": 32, "kind": "parameter", "displayName": "Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "Remote repository password" }, - "username": { "index": 33, "kind": "parameter", "displayName": "Username", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "Remote repository username" } + "password": { "index": 32, "kind": "parameter", "displayName": "Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The password, or an access token, to authenticate with the remote repository in clone, pull, push and pushTag. Used only when username is set too." }, + "username": { "index": 33, "kind": "parameter", "displayName": "Username", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The user name to authenticate with the remote repository in clone, pull, push and pushTag. Used only when password is set too." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/git-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/git-component.adoc index 64710f52b5e2..3d014d227676 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/git-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/git-component.adoc @@ -2,7 +2,7 @@ :doctitle: Git :shortname: git :artifactid: camel-git -:description: Perform operations on git repositories. +:description: Run git operations, such as clone, commit, push and pull, on a local repository with JGit, and receive its commits, branches and tags. :since: 2.16 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-git/src/generated/resources/META-INF/org/apache/camel/component/git/git.json b/components/camel-git/src/generated/resources/META-INF/org/apache/camel/component/git/git.json index 5992afb34acb..a2897c9ff7e3 100644 --- a/components/camel-git/src/generated/resources/META-INF/org/apache/camel/component/git/git.json +++ b/components/camel-git/src/generated/resources/META-INF/org/apache/camel/component/git/git.json @@ -3,7 +3,7 @@ "kind": "component", "name": "git", "title": "Git", - "description": "Perform operations on git repositories.", + "description": "Run git operations, such as clone, commit, push and pull, on a local repository with JGit, and receive its commits, branches and tags.", "deprecated": false, "firstVersion": "2.16.0", "label": "file", @@ -31,19 +31,19 @@ "healthCheckProducerEnabled": { "index": 4, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer [...] }, "headers": { - "CamelGitOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation to do on a repository, if not specified as endpoint option", "constantName": "org.apache.camel.component.git.GitConstants#GIT_OPERATION" }, - "CamelGitFilename": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The file name in an add operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_FILE_NAME" }, - "CamelGitCommitMessage": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit message related in a commit operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_MESSAGE" }, - "CamelGitCommitUsername": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit username in a commit operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_USERNAME" }, - "CamelGitCommitEmail": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit email in a commit operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_EMAIL" }, + "CamelGitOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation that the producer performs, used only when the operation option is not set.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_OPERATION" }, + "CamelGitFilename": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The path of the file to stage (add) or to remove from the index and the working tree (remove), relative to the root of the working tree with \/ as separator. A directory stands for all the files below it, and file globs are not supported. Required by add and r [...] + "CamelGitCommitMessage": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The message of the new commit in commit and commitAll. Required by both.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_MESSAGE" }, + "CamelGitCommitUsername": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the author and committer of the new commit in commit and commitAll. Used only together with CamelGitCommitEmail. Without both, JGit takes them from user.name and user.email of the git config.", "constantName": "org.apache.camel.component.git. [...] + "CamelGitCommitEmail": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The email of the author and committer of the new commit in commit and commitAll. Used only together with CamelGitCommitUsername.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_EMAIL" }, "CamelGitCommitId": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The commit id (the sha): of the commit consumed by the commit consumer, of the commit to cherry pick in a cherryPick operation, and of the new commit after a commit or commitAll operation", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_ID" }, - "CamelGitAllowEmpty": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "The flag to manage empty git commits", "constantName": "org.apache.camel.component.git.GitConstants#GIT_ALLOW_EMPTY" }, - "CamelGitAuthorName": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The author name", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_AUTHOR_NAME" }, - "CamelGitCommiterName": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The committer name", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_COMMITTER_NAME" }, - "CamelGitCommitTime": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The commit time", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_TIME" }, - "CamelGitBranchName": { "index": 10, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The branch\/tag name", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_NAME" }, - "CamelGitBranchLeaf": { "index": 11, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The leaf", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_LEAF" }, - "CamelGitBranchObjectId": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The object id", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_OBJECT_ID" } + "CamelGitAllowEmpty": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Whether commit and commitAll create a commit when there is nothing to commit. Replaces the allowEmpty option.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_ALLOW_EMPTY" }, + "CamelGitAuthorName": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the author of the consumed commit.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_AUTHOR_NAME" }, + "CamelGitCommiterName": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the committer of the consumed commit.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_COMMITTER_NAME" }, + "CamelGitCommitTime": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The commit time of the consumed commit, in seconds since 1970-01-01T00:00:00Z.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_COMMIT_TIME" }, + "CamelGitBranchName": { "index": 10, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The full name of the consumed ref, such as refs\/heads\/main, refs\/remotes\/origin\/main or refs\/tags\/v1. The branch and tag consumers set it and also put it in the body.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_NAME" }, + "CamelGitBranchLeaf": { "index": 11, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The full name of the ref that the consumed ref points to in the end, when it is a symbolic ref such as refs\/remotes\/origin\/HEAD. For any other ref it is the same as CamelGitBranchName.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BR [...] + "CamelGitBranchObjectId": { "index": 12, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of the object that the consumed ref points to: a commit for a branch or a lightweight tag, a tag object for an annotated tag.", "constantName": "org.apache.camel.component.git.GitConstants#GIT_BRANCH_OBJECT_ID" } }, "bodyTypes": { "consumerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "description": "The full message of the commit with type=commit, the name of the ref, such as refs\/heads\/main or refs\/tags\/v1, with type=branch and tag. The commit id, author, committer and time, or the object id of the ref, are in headers" }, @@ -51,23 +51,23 @@ "producerOut": { "carriers": [ "unchanged", "pojo", "list", "iterator", "map" ], "byOption": [ { "option": "operation", "value": "status", "carriers": [ "pojo" ], "javaType": "org.eclipse.jgit.api.Status" }, { "option": "operation", "value": "log", "carriers": [ "iterator" ], "javaType": "org.eclipse.jgit.revwalk.RevWalk" }, { "option": "operation", "value": "push", "carriers": [ "list" ] }, { "option": "operation", "value": "pushTag", "carriers": [ "list" ] }, { "option": "operation [...] }, "properties": { - "localPath": { "index": 0, "kind": "path", "displayName": "Local Path", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Local repository path" }, - "branchName": { "index": 1, "kind": "parameter", "displayName": "Branch Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The branch name to work on" }, + "localPath": { "index": 0, "kind": "path", "displayName": "Local Path", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The path of the working tree of the local repository, the directory that holds the .git directory. The clone operation creates the repository there and fails if the directory exists, and init creates it there." }, + "branchName": { "index": 1, "kind": "parameter", "displayName": "Branch Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the branch. The commit consumer receives the commits reachable from it, or the commits of all refs when it is not set or not found. For the producer it is the branch to create or delete, to check out (clone and checkout, w [...] "sendEmptyMessageWhenIdle": { "index": 2, "kind": "parameter", "displayName": "Send Empty Message When Idle", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead." }, - "type": { "index": 3, "kind": "parameter", "displayName": "Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.git.consumer.GitType", "enum": [ "commit", "tag", "branch" ], "deprecated": false, "autowired": false, "secret": false, "description": "The consumer type" }, + "type": { "index": 3, "kind": "parameter", "displayName": "Type", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.git.consumer.GitType", "enum": [ "commit", "tag", "branch" ], "deprecated": false, "autowired": false, "secret": false, "description": "What the consumer receives: commit for each commit, tag for each tag, or branch for each local and remote-tracking branch. Required for the consumer. It receives all the [...] "bridgeErrorHandler": { "index": 4, "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming [...] "exceptionHandler": { "index": 5, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By def [...] "exchangePattern": { "index": 6, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "index": 7, "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the pol [...] - "allowEmpty": { "index": 8, "kind": "parameter", "displayName": "Allow Empty", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "The flag to manage empty git commits" }, - "depth": { "index": 9, "kind": "parameter", "displayName": "Depth", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Clone depth for shallow clones. Must be a positive integer. A value of 1 fetches only the latest commit. When set to 0 or not specified, a full clone is performed." }, - "operation": { "index": 10, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "add", "checkout", "cherryPick", "clean", "clone", "commit", "commitAll", "createBranch", "createTag", "deleteBranch", "deleteTag", "gc", "init", "log", "merge", "pull", "push", "pushTag", "remoteAdd", "remoteList", "remove", "showBranches", "showTags", "status" ], "deprecated": false, "auto [...] - "remoteName": { "index": 11, "kind": "parameter", "displayName": "Remote Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The remote repository name to use in particular operation like pull" }, - "remotePath": { "index": 12, "kind": "parameter", "displayName": "Remote Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The remote repository path" }, - "tagName": { "index": 13, "kind": "parameter", "displayName": "Tag Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The tag name to work on" }, - "targetBranchName": { "index": 14, "kind": "parameter", "displayName": "Target Branch Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "master", "description": "Name of target branch in merge operation. If not supplied will try to use init.defaultBranch git configs. If not configured will use default value" }, + "allowEmpty": { "index": 8, "kind": "parameter", "displayName": "Allow Empty", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether commit and commitAll create a commit when there is nothing to commit. If false, they fail with the EmptyCommitException of JGit instead, as git commit does without --allow-empty. The CamelGitAllowEmpty [...] + "depth": { "index": 9, "kind": "parameter", "displayName": "Depth", "group": "producer", "label": "producer", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The depth of a shallow clone in the clone operation, as the number of commits of history to fetch. For example, 1 fetches only the latest commit. The default 0 makes a full clone, and a negative value fails the clone." }, + "operation": { "index": 10, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "add", "checkout", "cherryPick", "clean", "clone", "commit", "commitAll", "createBranch", "createTag", "deleteBranch", "deleteTag", "gc", "init", "log", "merge", "pull", "push", "pushTag", "remoteAdd", "remoteList", "remove", "showBranches", "showTags", "status" ], "deprecated": false, "auto [...] + "remoteName": { "index": 11, "kind": "parameter", "displayName": "Remote Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the remote, such as origin, that pull, push and pushTag use and that remoteAdd adds. Required by these operations." }, + "remotePath": { "index": 12, "kind": "parameter", "displayName": "Remote Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The URL of the remote repository, such as https:\/\/github.com\/apache\/camel.git. The clone operation clones it, and remoteAdd adds it as the remote named remoteName." }, + "tagName": { "index": 13, "kind": "parameter", "displayName": "Tag Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the tag for createTag, which creates an annotated tag of HEAD, and for deleteTag and pushTag. For checkout, the tag that the new branchName branch starts from." }, + "targetBranchName": { "index": 14, "kind": "parameter", "displayName": "Target Branch Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "master", "description": "The branch that the merge operation checks out and merges branchName into. If not set, merge uses init.defaultBranch of the user git config, or master when that is not set either." }, "lazyStartProducer": { "index": 15, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...] - "gitConfigFile": { "index": 16, "kind": "parameter", "displayName": "Git Config File", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "A String with path to a .gitconfig file" }, + "gitConfigFile": { "index": 16, "kind": "parameter", "displayName": "Git Config File", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The git config file to read in place of the user git config (\/.gitconfig), as a URI with the classpath:, file:, http: or https: scheme. When it is set, the system git config is not read." }, "backoffErrorThreshold": { "index": 17, "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, "backoffIdleThreshold": { "index": 18, "kind": "parameter", "displayName": "Backoff Idle Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "The number of subsequent idle polls that should happen before the backoffMultipler should kick-in." }, "backoffMultiplier": { "index": 19, "kind": "parameter", "displayName": "Backoff Multiplier", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "To let the scheduled polling consumer backoff if there has been a number of subsequent idles\/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is h [...] @@ -83,7 +83,7 @@ "startScheduler": { "index": 29, "kind": "parameter", "displayName": "Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the scheduler should be auto started." }, "timeUnit": { "index": 30, "kind": "parameter", "displayName": "Time Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "enum", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and delay options." }, "useFixedDelay": { "index": 31, "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." }, - "password": { "index": 32, "kind": "parameter", "displayName": "Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "Remote repository password" }, - "username": { "index": 33, "kind": "parameter", "displayName": "Username", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "Remote repository username" } + "password": { "index": 32, "kind": "parameter", "displayName": "Password", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The password, or an access token, to authenticate with the remote repository in clone, pull, push and pushTag. Used only when username is set too." }, + "username": { "index": 33, "kind": "parameter", "displayName": "Username", "group": "security", "label": "producer,security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "The user name to authenticate with the remote repository in clone, pull, push and pushTag. Used only when password is set too." } } } diff --git a/components/camel-git/src/main/docs/git-component.adoc b/components/camel-git/src/main/docs/git-component.adoc index 64710f52b5e2..3d014d227676 100644 --- a/components/camel-git/src/main/docs/git-component.adoc +++ b/components/camel-git/src/main/docs/git-component.adoc @@ -2,7 +2,7 @@ :doctitle: Git :shortname: git :artifactid: camel-git -:description: Perform operations on git repositories. +:description: Run git operations, such as clone, commit, push and pull, on a local repository with JGit, and receive its commits, branches and tags. :since: 2.16 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-git/src/main/java/org/apache/camel/component/git/GitConstants.java b/components/camel-git/src/main/java/org/apache/camel/component/git/GitConstants.java index 555887327e3a..ad41652ecd63 100644 --- a/components/camel-git/src/main/java/org/apache/camel/component/git/GitConstants.java +++ b/components/camel-git/src/main/java/org/apache/camel/component/git/GitConstants.java @@ -19,33 +19,58 @@ package org.apache.camel.component.git; import org.apache.camel.spi.Metadata; public interface GitConstants { - @Metadata(label = "producer", description = "The operation to do on a repository, if not specified as endpoint option", + @Metadata(label = "producer", description = "The operation that the producer performs, used only when the operation option" + + " is not set.", javaType = "String") String GIT_OPERATION = "CamelGitOperation"; - @Metadata(label = "producer", description = "The file name in an add operation", javaType = "String") + @Metadata(label = "producer", + description = "The path of the file to stage (add) or to remove from the index and the working" + + " tree (remove), relative to the root of the working tree with / as separator." + + " A directory stands for all the files below it, and file globs are not" + + " supported. Required by add and remove.", + javaType = "String") String GIT_FILE_NAME = "CamelGitFilename"; - @Metadata(label = "producer", description = "The commit message related in a commit operation", javaType = "String") + @Metadata(label = "producer", description = "The message of the new commit in commit and commitAll. Required by both.", + javaType = "String") String GIT_COMMIT_MESSAGE = "CamelGitCommitMessage"; - @Metadata(label = "producer", description = "The commit username in a commit operation", javaType = "String") + @Metadata(label = "producer", description = "The name of the author and committer of the new commit in commit and" + + " commitAll. Used only together with CamelGitCommitEmail. Without both, JGit" + + " takes them from user.name and user.email of the git config.", + javaType = "String") String GIT_COMMIT_USERNAME = "CamelGitCommitUsername"; - @Metadata(label = "producer", description = "The commit email in a commit operation", javaType = "String") + @Metadata(label = "producer", description = "The email of the author and committer of the new commit in commit and" + + " commitAll. Used only together with CamelGitCommitUsername.", + javaType = "String") String GIT_COMMIT_EMAIL = "CamelGitCommitEmail"; @Metadata(description = "The commit id (the sha): of the commit consumed by the commit consumer, of the commit to cherry" + " pick in a cherryPick operation, and of the new commit after a commit or commitAll operation", javaType = "String") String GIT_COMMIT_ID = "CamelGitCommitId"; - @Metadata(label = "producer", description = "The flag to manage empty git commits", javaType = "Boolean") + @Metadata(label = "producer", description = "Whether commit and commitAll create a commit when there is nothing to commit." + + " Replaces the allowEmpty option.", + javaType = "Boolean") String GIT_ALLOW_EMPTY = "CamelGitAllowEmpty"; - @Metadata(label = "consumer", description = "The author name", javaType = "String") + @Metadata(label = "consumer", description = "The name of the author of the consumed commit.", javaType = "String") String GIT_COMMIT_AUTHOR_NAME = "CamelGitAuthorName"; - @Metadata(label = "consumer", description = "The committer name", javaType = "String") + @Metadata(label = "consumer", description = "The name of the committer of the consumed commit.", javaType = "String") String GIT_COMMIT_COMMITTER_NAME = "CamelGitCommiterName"; - @Metadata(label = "consumer", description = "The commit time", javaType = "int") + @Metadata(label = "consumer", description = "The commit time of the consumed commit, in seconds since" + + " 1970-01-01T00:00:00Z.", + javaType = "int") String GIT_COMMIT_TIME = "CamelGitCommitTime"; - @Metadata(label = "consumer", description = "The branch/tag name", javaType = "String") + @Metadata(label = "consumer", description = "The full name of the consumed ref, such as refs/heads/main," + + " refs/remotes/origin/main or refs/tags/v1. The branch and tag consumers set it" + + " and also put it in the body.", + javaType = "String") String GIT_BRANCH_NAME = "CamelGitBranchName"; - @Metadata(label = "consumer", description = "The leaf", javaType = "String") + @Metadata(label = "consumer", + description = "The full name of the ref that the consumed ref points to in the end, when it is" + + " a symbolic ref such as refs/remotes/origin/HEAD. For any other ref it is the" + + " same as CamelGitBranchName.", + javaType = "String") String GIT_BRANCH_LEAF = "CamelGitBranchLeaf"; - @Metadata(label = "consumer", description = "The object id", javaType = "String") + @Metadata(label = "consumer", description = "The id of the object that the consumed ref points to: a commit for a branch or" + + " a lightweight tag, a tag object for an annotated tag.", + javaType = "String") String GIT_BRANCH_OBJECT_ID = "CamelGitBranchObjectId"; } diff --git a/components/camel-git/src/main/java/org/apache/camel/component/git/GitEndpoint.java b/components/camel-git/src/main/java/org/apache/camel/component/git/GitEndpoint.java index 48cb56c1df83..eff042c23ebb 100644 --- a/components/camel-git/src/main/java/org/apache/camel/component/git/GitEndpoint.java +++ b/components/camel-git/src/main/java/org/apache/camel/component/git/GitEndpoint.java @@ -35,7 +35,8 @@ import org.apache.camel.spi.UriPath; import org.apache.camel.support.ScheduledPollEndpoint; /** - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local repository with JGit, and receive its commits, + * branches and tags. */ @UriEndpoint(firstVersion = "2.16.0", scheme = "git", title = "Git", syntax = "git:localPath", category = { Category.FILE }, headersClass = GitConstants.class) @@ -97,52 +98,80 @@ import org.apache.camel.support.ScheduledPollEndpoint; + " from the CamelGitOperation header")) public class GitEndpoint extends ScheduledPollEndpoint { - @UriPath + @UriPath(description = "The path of the working tree of the local repository, the directory that holds the .git" + + " directory. The clone operation creates the repository there and fails if the directory exists," + + " and init creates it there.") @Metadata(required = true) private String localPath; - @UriParam + @UriParam(description = "The name of the branch. The commit consumer receives the commits reachable from it, or the" + + " commits of all refs when it is not set or not found. For the producer it is the branch to" + + " create or delete, to check out (clone and checkout, which creates it when it does not exist) or" + + " to merge into targetBranchName (merge), and add, remove, commit, commitAll, status, log, push," + + " pull, cherryPick and clean check out this existing branch first.") private String branchName; @UriParam(label = "producer", - description = "Name of target branch in merge operation. If not supplied will try to use init.defaultBranch git configs. If not configured will use default value", + description = "The branch that the merge operation checks out and merges branchName into. If not set, merge" + + " uses init.defaultBranch of the user git config, or master when that is not set either.", defaultValue = "master") private String targetBranchName; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "The name of the tag for createTag, which creates an annotated tag of HEAD, and for deleteTag and" + + " pushTag. For checkout, the tag that the new branchName branch starts from.") private String tagName; - @UriParam(enums = "commit,tag,branch", label = "consumer") + @UriParam(enums = "commit,tag,branch", label = "consumer", + description = "What the consumer receives: commit for each commit, tag for each tag, or branch for each local" + + " and remote-tracking branch. Required for the consumer. It receives all the existing items on" + + " its first poll and keeps the consumed ones in memory only, so after a restart it receives all" + + " of them again.") private GitType type; - @UriParam(label = "producer,security", security = "secret") + @UriParam(label = "producer,security", security = "secret", + description = "The user name to authenticate with the remote repository in clone, pull, push and pushTag. Used" + + " only when password is set too.") private String username; - @UriParam(label = "producer,security", security = "secret") + @UriParam(label = "producer,security", security = "secret", + description = "The password, or an access token, to authenticate with the remote repository in clone, pull, push" + + " and pushTag. Used only when username is set too.") private String password; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "The URL of the remote repository, such as https://github.com/apache/camel.git. The clone" + + " operation clones it, and remoteAdd adds it as the remote named remoteName.") private String remotePath; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "The name of the remote, such as origin, that pull, push and pushTag use and that remoteAdd adds." + + " Required by these operations.") private String remoteName; // Set to true for backward compatibility , better to set to false (native git behavior) - @UriParam(defaultValue = "true") + @UriParam(defaultValue = "true", + description = "Whether commit and commitAll create a commit when there is nothing to commit. If false, they fail" + + " with the EmptyCommitException of JGit instead, as git commit does without --allow-empty. The" + + " CamelGitAllowEmpty header replaces this option.") @Metadata(label = "producer") private boolean allowEmpty = true; @UriParam(label = "producer", - description = "Clone depth for shallow clones. Must be a positive integer. " - + "A value of 1 fetches only the latest commit. " - + "When set to 0 or not specified, a full clone is performed.") + description = "The depth of a shallow clone in the clone operation, as the number of commits of history to" + + " fetch. For example, 1 fetches only the latest commit. The default 0 makes a full clone, and a" + + " negative value fails the clone.") private int depth; @UriParam(label = "producer", - enums = "add,checkout,cherryPick,clean,clone,commit,commitAll,createBranch,createTag,deleteBranch,deleteTag,gc,init,log,merge,pull,push,pushTag,remoteAdd,remoteList,remove,showBranches,showTags,status") + enums = "add,checkout,cherryPick,clean,clone,commit,commitAll,createBranch,createTag,deleteBranch,deleteTag,gc,init,log,merge,pull,push,pushTag,remoteAdd,remoteList,remove,showBranches,showTags,status", + description = "The operation that the producer performs. If not set, the producer takes it from the" + + " CamelGitOperation header.") private String operation; - @UriParam(description = "A String with path to a .gitconfig file", label = "advanced") + @UriParam(description = "The git config file to read in place of the user git config (~/.gitconfig), as a URI with the" + + " classpath:, file:, http: or https: scheme. When it is set, the system git config is not read.", + label = "advanced") private String gitConfigFile; public GitEndpoint(String uri, GitComponent component) { @@ -169,9 +198,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { return consumer; } - /** - * The remote repository path - */ public String getRemotePath() { return remotePath; } @@ -180,9 +206,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.remotePath = remotePath; } - /** - * The branch name to work on - */ public String getBranchName() { return branchName; } @@ -191,9 +214,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.branchName = branchName; } - /** - * Remote repository username - */ public String getUsername() { return username; } @@ -202,9 +222,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.username = username; } - /** - * Remote repository password - */ public String getPassword() { return password; } @@ -213,9 +230,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.password = password; } - /** - * Local repository path - */ public String getLocalPath() { return localPath; } @@ -224,9 +238,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.localPath = localPath; } - /** - * The operation to do on the repository - */ public String getOperation() { return operation; } @@ -235,9 +246,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.operation = operation; } - /** - * The consumer type - */ public GitType getType() { return type; } @@ -246,9 +254,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.type = type; } - /** - * The tag name to work on - */ public String getTagName() { return tagName; } @@ -257,9 +262,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.tagName = tagName; } - /** - * The remote repository name to use in particular operation like pull - */ public String getRemoteName() { return remoteName; } @@ -268,9 +270,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.remoteName = remoteName; } - /** - * The flag to manage empty git commits - */ public boolean isAllowEmpty() { return allowEmpty; } @@ -279,9 +278,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.allowEmpty = allowEmpty; } - /** - * Clone depth for shallow clones - */ public int getDepth() { return depth; } @@ -290,9 +286,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.depth = depth; } - /** - * The branch name to merge - */ public String getTargetBranchName() { return this.targetBranchName; } @@ -301,9 +294,6 @@ public class GitEndpoint extends ScheduledPollEndpoint { this.targetBranchName = targetBranchName; } - /** - * A String with path to a .gitconfig file - */ public String getGitConfigFile() { return this.gitConfigFile; } diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index f3be60f935e7..f75da7cacfc9 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -1979,7 +1979,8 @@ public interface ComponentsBuilderFactory { } /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GitComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GitComponentBuilderFactory.java index 490625b2ee33..3f2799e42ae2 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GitComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GitComponentBuilderFactory.java @@ -24,7 +24,8 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.git.GitComponent; /** - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +34,8 @@ public interface GitComponentBuilderFactory { /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java index 329d9a09bada..88dc0038939a 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java @@ -1568,7 +1568,8 @@ public class EndpointHeaderBuilders { } /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 9023cb1b5040..80625f1e94b7 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -6577,7 +6577,8 @@ public class StaticEndpointBuilders { } /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 @@ -6586,7 +6587,9 @@ public class StaticEndpointBuilders { * Syntax: <code>git:localPath</code> * * Path parameter: localPath (required) - * Local repository path + * The path of the working tree of the local repository, the directory that + * holds the .git directory. The clone operation creates the repository + * there and fails if the directory exists, and init creates it there. * * @param path localPath * @return the dsl builder @@ -6596,7 +6599,8 @@ public class StaticEndpointBuilders { } /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 @@ -6605,7 +6609,9 @@ public class StaticEndpointBuilders { * Syntax: <code>git:localPath</code> * * Path parameter: localPath (required) - * Local repository path + * The path of the working tree of the local repository, the directory that + * holds the .git directory. The clone operation creates the repository + * there and fails if the directory exists, and init creates it there. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitEndpointBuilderFactory.java index 4f9512682d0f..21e8ea4f5ce9 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitEndpointBuilderFactory.java @@ -27,7 +27,8 @@ import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Generated by camel build tools - do NOT edit this file! */ @@ -44,7 +45,13 @@ public interface GitEndpointBuilderFactory { return (AdvancedGitEndpointConsumerBuilder) this; } /** - * The branch name to work on. + * The name of the branch. The commit consumer receives the commits + * reachable from it, or the commits of all refs when it is not set or + * not found. For the producer it is the branch to create or delete, to + * check out (clone and checkout, which creates it when it does not + * exist) or to merge into targetBranchName (merge), and add, remove, + * commit, commitAll, status, log, push, pull, cherryPick and clean + * check out this existing branch first. * * The option is a: <code>java.lang.String</code> type. * @@ -90,7 +97,11 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The consumer type. + * What the consumer receives: commit for each commit, tag for each tag, + * or branch for each local and remote-tracking branch. Required for the + * consumer. It receives all the existing items on its first poll and + * keeps the consumed ones in memory only, so after a restart it + * receives all of them again. * * The option is a: * <code>org.apache.camel.component.git.consumer.GitType</code> type. @@ -105,7 +116,11 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The consumer type. + * What the consumer receives: commit for each commit, tag for each tag, + * or branch for each local and remote-tracking branch. Required for the + * consumer. It receives all the existing items on its first poll and + * keeps the consumed ones in memory only, so after a restart it + * receives all of them again. * * The option will be converted to a * <code>org.apache.camel.component.git.consumer.GitType</code> type. @@ -783,7 +798,9 @@ public interface GitEndpointBuilderFactory { return this; } /** - * A String with path to a .gitconfig file. + * The git config file to read in place of the user git config + * (/.gitconfig), as a URI with the classpath:, file:, http: or https: + * scheme. When it is set, the system git config is not read. * * The option is a: <code>java.lang.String</code> type. * @@ -809,7 +826,13 @@ public interface GitEndpointBuilderFactory { } /** - * The branch name to work on. + * The name of the branch. The commit consumer receives the commits + * reachable from it, or the commits of all refs when it is not set or + * not found. For the producer it is the branch to create or delete, to + * check out (clone and checkout, which creates it when it does not + * exist) or to merge into targetBranchName (merge), and add, remove, + * commit, commitAll, status, log, push, pull, cherryPick and clean + * check out this existing branch first. * * The option is a: <code>java.lang.String</code> type. * @@ -823,7 +846,10 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The flag to manage empty git commits. + * Whether commit and commitAll create a commit when there is nothing to + * commit. If false, they fail with the EmptyCommitException of JGit + * instead, as git commit does without --allow-empty. The + * CamelGitAllowEmpty header replaces this option. * * The option is a: <code>boolean</code> type. * @@ -838,7 +864,10 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The flag to manage empty git commits. + * Whether commit and commitAll create a commit when there is nothing to + * commit. If false, they fail with the EmptyCommitException of JGit + * instead, as git commit does without --allow-empty. The + * CamelGitAllowEmpty header replaces this option. * * The option will be converted to a <code>boolean</code> type. * @@ -853,9 +882,10 @@ public interface GitEndpointBuilderFactory { return this; } /** - * Clone depth for shallow clones. Must be a positive integer. A value - * of 1 fetches only the latest commit. When set to 0 or not specified, - * a full clone is performed. + * The depth of a shallow clone in the clone operation, as the number of + * commits of history to fetch. For example, 1 fetches only the latest + * commit. The default 0 makes a full clone, and a negative value fails + * the clone. * * The option is a: <code>int</code> type. * @@ -869,9 +899,10 @@ public interface GitEndpointBuilderFactory { return this; } /** - * Clone depth for shallow clones. Must be a positive integer. A value - * of 1 fetches only the latest commit. When set to 0 or not specified, - * a full clone is performed. + * The depth of a shallow clone in the clone operation, as the number of + * commits of history to fetch. For example, 1 fetches only the latest + * commit. The default 0 makes a full clone, and a negative value fails + * the clone. * * The option will be converted to a <code>int</code> type. * @@ -885,7 +916,8 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The operation to do on the repository. + * The operation that the producer performs. If not set, the producer + * takes it from the CamelGitOperation header. * * The option is a: <code>java.lang.String</code> type. * @@ -899,7 +931,8 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The remote repository name to use in particular operation like pull. + * The name of the remote, such as origin, that pull, push and pushTag + * use and that remoteAdd adds. Required by these operations. * * The option is a: <code>java.lang.String</code> type. * @@ -913,7 +946,9 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The remote repository path. + * The URL of the remote repository, such as + * https://github.com/apache/camel.git. The clone operation clones it, + * and remoteAdd adds it as the remote named remoteName. * * The option is a: <code>java.lang.String</code> type. * @@ -927,7 +962,9 @@ public interface GitEndpointBuilderFactory { return this; } /** - * The tag name to work on. + * The name of the tag for createTag, which creates an annotated tag of + * HEAD, and for deleteTag and pushTag. For checkout, the tag that the + * new branchName branch starts from. * * The option is a: <code>java.lang.String</code> type. * @@ -941,9 +978,9 @@ public interface GitEndpointBuilderFactory { return this; } /** - * Name of target branch in merge operation. If not supplied will try to - * use init.defaultBranch git configs. If not configured will use - * default value. + * The branch that the merge operation checks out and merges branchName + * into. If not set, merge uses init.defaultBranch of the user git + * config, or master when that is not set either. * * The option is a: <code>java.lang.String</code> type. * @@ -958,7 +995,9 @@ public interface GitEndpointBuilderFactory { return this; } /** - * Remote repository password. + * The password, or an access token, to authenticate with the remote + * repository in clone, pull, push and pushTag. Used only when username + * is set too. * * The option is a: <code>java.lang.String</code> type. * @@ -972,7 +1011,8 @@ public interface GitEndpointBuilderFactory { return this; } /** - * Remote repository username. + * The user name to authenticate with the remote repository in clone, + * pull, push and pushTag. Used only when password is set too. * * The option is a: <code>java.lang.String</code> type. * @@ -1042,7 +1082,9 @@ public interface GitEndpointBuilderFactory { return this; } /** - * A String with path to a .gitconfig file. + * The git config file to read in place of the user git config + * (/.gitconfig), as a URI with the classpath:, file:, http: or https: + * scheme. When it is set, the system git config is not read. * * The option is a: <code>java.lang.String</code> type. * @@ -1069,7 +1111,13 @@ public interface GitEndpointBuilderFactory { } /** - * The branch name to work on. + * The name of the branch. The commit consumer receives the commits + * reachable from it, or the commits of all refs when it is not set or + * not found. For the producer it is the branch to create or delete, to + * check out (clone and checkout, which creates it when it does not + * exist) or to merge into targetBranchName (merge), and add, remove, + * commit, commitAll, status, log, push, pull, cherryPick and clean + * check out this existing branch first. * * The option is a: <code>java.lang.String</code> type. * @@ -1096,7 +1144,9 @@ public interface GitEndpointBuilderFactory { } /** - * A String with path to a .gitconfig file. + * The git config file to read in place of the user git config + * (/.gitconfig), as a URI with the classpath:, file:, http: or https: + * scheme. When it is set, the system git config is not read. * * The option is a: <code>java.lang.String</code> type. * @@ -1114,7 +1164,8 @@ public interface GitEndpointBuilderFactory { public interface GitBuilders { /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 @@ -1127,7 +1178,8 @@ public interface GitEndpointBuilderFactory { } /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 @@ -1136,7 +1188,10 @@ public interface GitEndpointBuilderFactory { * Syntax: <code>git:localPath</code> * * Path parameter: localPath (required) - * Local repository path + * The path of the working tree of the local repository, the directory + * that holds the .git directory. The clone operation creates the + * repository there and fails if the directory exists, and init creates + * it there. * * @param path localPath * @return the dsl builder @@ -1146,7 +1201,8 @@ public interface GitEndpointBuilderFactory { } /** * Git (camel-git) - * Perform operations on git repositories. + * Run git operations, such as clone, commit, push and pull, on a local + * repository with JGit, and receive its commits, branches and tags. * * Category: file * Since: 2.16 @@ -1155,7 +1211,10 @@ public interface GitEndpointBuilderFactory { * Syntax: <code>git:localPath</code> * * Path parameter: localPath (required) - * Local repository path + * The path of the working tree of the local repository, the directory + * that holds the .git directory. The clone operation creates the + * repository there and fails if the directory exists, and init creates + * it there. * * @param componentName to use a custom component name for the endpoint * instead of the default name @@ -1178,8 +1237,8 @@ public interface GitEndpointBuilderFactory { public static final GitHeaderNameBuilder INSTANCE = new GitHeaderNameBuilder(); /** - * The operation to do on a repository, if not specified as endpoint - * option. + * The operation that the producer performs, used only when the + * operation option is not set. * * The option is a: {@code String} type. * @@ -1191,7 +1250,10 @@ public interface GitEndpointBuilderFactory { return "CamelGitOperation"; } /** - * The file name in an add operation. + * The path of the file to stage (add) or to remove from the index and + * the working tree (remove), relative to the root of the working tree + * with / as separator. A directory stands for all the files below it, + * and file globs are not supported. Required by add and remove. * * The option is a: {@code String} type. * @@ -1203,7 +1265,8 @@ public interface GitEndpointBuilderFactory { return "CamelGitFilename"; } /** - * The commit message related in a commit operation. + * The message of the new commit in commit and commitAll. Required by + * both. * * The option is a: {@code String} type. * @@ -1215,7 +1278,9 @@ public interface GitEndpointBuilderFactory { return "CamelGitCommitMessage"; } /** - * The commit username in a commit operation. + * The name of the author and committer of the new commit in commit and + * commitAll. Used only together with CamelGitCommitEmail. Without both, + * JGit takes them from user.name and user.email of the git config. * * The option is a: {@code String} type. * @@ -1227,7 +1292,8 @@ public interface GitEndpointBuilderFactory { return "CamelGitCommitUsername"; } /** - * The commit email in a commit operation. + * The email of the author and committer of the new commit in commit and + * commitAll. Used only together with CamelGitCommitUsername. * * The option is a: {@code String} type. * @@ -1253,7 +1319,8 @@ public interface GitEndpointBuilderFactory { return "CamelGitCommitId"; } /** - * The flag to manage empty git commits. + * Whether commit and commitAll create a commit when there is nothing to + * commit. Replaces the allowEmpty option. * * The option is a: {@code Boolean} type. * @@ -1265,7 +1332,7 @@ public interface GitEndpointBuilderFactory { return "CamelGitAllowEmpty"; } /** - * The author name. + * The name of the author of the consumed commit. * * The option is a: {@code String} type. * @@ -1277,7 +1344,7 @@ public interface GitEndpointBuilderFactory { return "CamelGitAuthorName"; } /** - * The committer name. + * The name of the committer of the consumed commit. * * The option is a: {@code String} type. * @@ -1289,7 +1356,8 @@ public interface GitEndpointBuilderFactory { return "CamelGitCommiterName"; } /** - * The commit time. + * The commit time of the consumed commit, in seconds since + * 1970-01-01T00:00:00Z. * * The option is a: {@code int} type. * @@ -1301,7 +1369,9 @@ public interface GitEndpointBuilderFactory { return "CamelGitCommitTime"; } /** - * The branch/tag name. + * The full name of the consumed ref, such as refs/heads/main, + * refs/remotes/origin/main or refs/tags/v1. The branch and tag + * consumers set it and also put it in the body. * * The option is a: {@code String} type. * @@ -1313,7 +1383,9 @@ public interface GitEndpointBuilderFactory { return "CamelGitBranchName"; } /** - * The leaf. + * The full name of the ref that the consumed ref points to in the end, + * when it is a symbolic ref such as refs/remotes/origin/HEAD. For any + * other ref it is the same as CamelGitBranchName. * * The option is a: {@code String} type. * @@ -1325,7 +1397,8 @@ public interface GitEndpointBuilderFactory { return "CamelGitBranchLeaf"; } /** - * The object id. + * The id of the object that the consumed ref points to: a commit for a + * branch or a lightweight tag, a tag object for an annotated tag. * * The option is a: {@code String} type. * diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md index 55347462d522..efb05a5f3bcb 100644 --- a/tasks/component-descriptions.md +++ b/tasks/component-descriptions.md @@ -181,7 +181,7 @@ or removes its row. | camel-freemarker | freemarker | | | camel-ftp | ftp, ftps, sftp | | | camel-geocoder | geocoder | yes | -| camel-git | git | | +| camel-git | git | yes | | camel-github2 | github2 | | | camel-google-bigquery | google-bigquery, google-bigquery-sql | | | camel-google-calendar | google-calendar, google-calendar-stream | |
