Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
"CamelGitHubIssueTitle": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The title of the issue", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_ISSUE_TITLE" },
"CamelGitHubCommitAuthor": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit author", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_AUTHOR" },
"CamelGitHubCommitCommitter": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The committer name", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_COMMITTER" },
"CamelGitHubCommitSha": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit sha", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_SHA" },
"CamelGitHubCommitUrl": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit URL", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_URL" },
"CamelGitHubEventPayload": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.kohsuke.github.GHEventPayload", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event payload", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_EVENT_PAYLOAD" }
"CamelGitHubCommitSha": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit sha. The getCommitFile producer reads the file at this commit (a commit id of 40 hexadecimal characters).", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_SHA" },
"CamelGitHubFilePath": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of the file in the repository for the getCommitFile producer. If not set, the body is the path.", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_FILE_PATH" },
"CamelGitHubCommitUrl": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit URL", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_URL" },
"CamelGitHubEventPayload": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.kohsuke.github.GHEventPayload", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event payload", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_EVENT_PAYLOAD" }
},
"properties": {
"type": { "index": 0, "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.github2.GitHub2Type", "enum": [ "CLOSEPULLREQUEST", "PULLREQUESTCOMMENT", "COMMIT", "PULLREQUEST", "TAG", "PULLREQUESTSTATE", "PULLREQUESTFILES", "GETCOMMITFILE", "CREATEISSUE", "EVENT" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What git operation to execute" },
Expand All @@ -56,7 +57,7 @@
"exceptionHandler": { "index": 9, "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 default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." },
"exchangePattern": { "index": 10, "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": 11, "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 poll operation before an Exchange have been created and being routed in Camel." },
"encoding": { "index": 12, "kind": "parameter", "displayName": "Encoding", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use the given encoding when getting a git commit file" },
"encoding": { "index": 12, "kind": "parameter", "displayName": "Encoding", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The charset of the content of the file for the getCommitFile producer (the default charset of the JVM if not set)" },
"state": { "index": 13, "kind": "parameter", "displayName": "State", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "error", "failure", "pending", "success" ], "deprecated": false, "autowired": false, "secret": false, "description": "To set git commit status state" },
"targetUrl": { "index": 14, "kind": "parameter", "displayName": "Target Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To set git commit status target url" },
"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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ Sets the commit status on a pull request.
|pullRequestFiles |none | - `CamelGitHubPullRequest` (integer) (REQUIRED): Pull request number.
Returns the list of files changed in a pull request.

|getCommitFile |none | - `CamelGitHubCommitSha` (String) (REQUIRED): Commit SHA.
- `CamelGitHubFilePath` (String) (REQUIRED): File path.
Returns the content of a file at a specific commit.
|getCommitFile |String (the path of the file, if the `CamelGitHubFilePath` header is not set) | - `CamelGitHubCommitSha` (String) (REQUIRED): The commit id (40 hexadecimal characters; a branch or tag name is not accepted).
- `CamelGitHubFilePath` (String): The path of the file in the repository, such as `docs/README.md`. If not set, the body is the path.
Returns the content of the file in the tree of that commit, as a `String` (decoded with the `encoding` option, or the default charset of the JVM).
|=======================================================================

=== Example: Consuming commits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
"CamelGitHubIssueTitle": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The title of the issue", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_ISSUE_TITLE" },
"CamelGitHubCommitAuthor": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit author", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_AUTHOR" },
"CamelGitHubCommitCommitter": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The committer name", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_COMMITTER" },
"CamelGitHubCommitSha": { "index": 6, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit sha", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_SHA" },
"CamelGitHubCommitUrl": { "index": 7, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit URL", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_URL" },
"CamelGitHubEventPayload": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.kohsuke.github.GHEventPayload", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event payload", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_EVENT_PAYLOAD" }
"CamelGitHubCommitSha": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit sha. The getCommitFile producer reads the file at this commit (a commit id of 40 hexadecimal characters).", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_SHA" },
"CamelGitHubFilePath": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The path of the file in the repository for the getCommitFile producer. If not set, the body is the path.", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_FILE_PATH" },
"CamelGitHubCommitUrl": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The commit URL", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_COMMIT_URL" },
"CamelGitHubEventPayload": { "index": 9, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.kohsuke.github.GHEventPayload", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event payload", "constantName": "org.apache.camel.component.github2.GitHub2Constants#GITHUB_EVENT_PAYLOAD" }
},
"properties": {
"type": { "index": 0, "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.github2.GitHub2Type", "enum": [ "CLOSEPULLREQUEST", "PULLREQUESTCOMMENT", "COMMIT", "PULLREQUEST", "TAG", "PULLREQUESTSTATE", "PULLREQUESTFILES", "GETCOMMITFILE", "CREATEISSUE", "EVENT" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What git operation to execute" },
Expand All @@ -56,7 +57,7 @@
"exceptionHandler": { "index": 9, "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 default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." },
"exchangePattern": { "index": 10, "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": 11, "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 poll operation before an Exchange have been created and being routed in Camel." },
"encoding": { "index": 12, "kind": "parameter", "displayName": "Encoding", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use the given encoding when getting a git commit file" },
"encoding": { "index": 12, "kind": "parameter", "displayName": "Encoding", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The charset of the content of the file for the getCommitFile producer (the default charset of the JVM if not set)" },
"state": { "index": 13, "kind": "parameter", "displayName": "State", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "error", "failure", "pending", "success" ], "deprecated": false, "autowired": false, "secret": false, "description": "To set git commit status state" },
"targetUrl": { "index": 14, "kind": "parameter", "displayName": "Target Url", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To set git commit status target url" },
"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 producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." },
Expand Down
6 changes: 3 additions & 3 deletions components/camel-github2/src/main/docs/github2-component.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ Sets the commit status on a pull request.
|pullRequestFiles |none | - `CamelGitHubPullRequest` (integer) (REQUIRED): Pull request number.
Returns the list of files changed in a pull request.

|getCommitFile |none | - `CamelGitHubCommitSha` (String) (REQUIRED): Commit SHA.
- `CamelGitHubFilePath` (String) (REQUIRED): File path.
Returns the content of a file at a specific commit.
|getCommitFile |String (the path of the file, if the `CamelGitHubFilePath` header is not set) | - `CamelGitHubCommitSha` (String) (REQUIRED): The commit id (40 hexadecimal characters; a branch or tag name is not accepted).
- `CamelGitHubFilePath` (String): The path of the file in the repository, such as `docs/README.md`. If not set, the body is the path.
Returns the content of the file in the tree of that commit, as a `String` (decoded with the `encoding` option, or the default charset of the JVM).
|=======================================================================

=== Example: Consuming commits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ public interface GitHub2Constants {
String GITHUB_COMMIT_AUTHOR = "CamelGitHubCommitAuthor";
@Metadata(label = "consumer", description = "The committer name", javaType = "String")
String GITHUB_COMMIT_COMMITTER = "CamelGitHubCommitCommitter";
@Metadata(label = "consumer", description = "The commit sha", javaType = "String")
@Metadata(description = "The commit sha. The getCommitFile producer reads the file at this commit (a commit id of"
+ " 40 hexadecimal characters).",
javaType = "String")
String GITHUB_COMMIT_SHA = "CamelGitHubCommitSha";
@Metadata(label = "producer",
description = "The path of the file in the repository for the getCommitFile producer. If not set, the body"
+ " is the path.",
javaType = "String")
String GITHUB_FILE_PATH = "CamelGitHubFilePath";
@Metadata(label = "consumer", description = "The commit URL", javaType = "String")
String GITHUB_COMMIT_URL = "CamelGitHubCommitUrl";
@Metadata(label = "consumer", description = "The event payload",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public String getEncoding() {
}

/**
* To use the given encoding when getting a git commit file
* The charset of the content of the file for the getCommitFile producer (the default charset of the JVM if not set)
*/
public void setEncoding(String encoding) {
this.encoding = encoding;
Expand Down
Loading
Loading