You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ap...@apache.org on 2026/05/21 13:29:37 UTC
(camel) branch main updated: Remove camel-github component
This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 2eec2f35faee Remove camel-github component
2eec2f35faee is described below
commit 2eec2f35faee7529bfa5a29a883ccf7ea5d0575f
Author: Aurélien Pupier <ap...@ibm.com>
AuthorDate: Thu May 21 10:35:42 2026 +0200
Remove camel-github component
It was deprecated in Camel 4.18 and there is another component
camel-github2 to replace it
Signed-off-by: Aurélien Pupier <ap...@ibm.com>
---
bom/camel-bom/pom.xml | 5 -
catalog/camel-allcomponents/pom.xml | 5 -
.../org/apache/camel/catalog/components.properties | 1 -
.../apache/camel/catalog/components/github.json | 78 --
components/camel-github/pom.xml | 60 -
.../github/GitHubComponentConfigurer.java | 81 --
.../component/github/GitHubEndpointConfigurer.java | 213 ----
.../component/github/GitHubEndpointUriFactory.java | 105 --
.../org/apache/camel/component/github/github.json | 78 --
.../services/org/apache/camel/component.properties | 7 -
.../services/org/apache/camel/component/github | 2 -
.../org/apache/camel/configurer/github-component | 2 -
.../org/apache/camel/configurer/github-endpoint | 2 -
.../org/apache/camel/urifactory/github-endpoint | 2 -
.../src/main/docs/github-component.adoc | 117 --
.../camel/component/github/GitHubComponent.java | 69 --
.../camel/component/github/GitHubConstants.java | 53 -
.../camel/component/github/GitHubEndpoint.java | 284 -----
.../apache/camel/component/github/GitHubType.java | 31 -
.../github/consumer/AbstractGitHubConsumer.java | 94 --
.../component/github/consumer/CommitConsumer.java | 209 ----
.../component/github/consumer/EventsConsumer.java | 112 --
.../consumer/PullRequestCommentConsumer.java | 125 --
.../github/consumer/PullRequestConsumer.java | 95 --
.../component/github/consumer/TagConsumer.java | 68 --
.../github/event/GitHubEventFetchStrategy.java | 38 -
.../github/producer/AbstractGitHubProducer.java | 65 -
.../github/producer/ClosePullRequestProducer.java | 62 -
.../github/producer/CreateIssueProducer.java | 65 -
.../github/producer/GetCommitFileProducer.java | 84 --
.../producer/PullRequestCommentProducer.java | 85 --
.../github/producer/PullRequestFilesProducer.java | 65 -
.../github/producer/PullRequestStateProducer.java | 86 --
.../component/github/GitHubComponentTestBase.java | 64 -
.../consumer/CommitConsumerBeginningTest.java | 70 --
.../github/consumer/CommitConsumerLastTest.java | 100 --
.../github/consumer/CommitConsumerRawTest.java | 61 -
.../CommitConsumerSkipExistingOnStartupTest.java | 70 --
.../github/consumer/CommitConsumerTest.java | 61 -
.../github/consumer/EventConsumerTest.java | 64 -
.../consumer/EventConsumerWithStrategyTest.java | 85 --
.../consumer/PullRequestCommentConsumerTest.java | 68 --
.../github/consumer/PullRequestConsumerTest.java | 72 --
.../SchedulerConfigurationConsumerTest.java | 46 -
.../component/github/consumer/TagConsumerTest.java | 61 -
.../producer/ClosePullRequestProducerTest.java | 93 --
.../github/producer/CreateIssueProducerTest.java | 77 --
.../producer/PullRequestCommentProducerTest.java | 86 --
.../producer/PullRequestFilesProducerTest.java | 85 --
.../producer/PullRequestStateProducerTest.java | 90 --
.../github/services/MockCommitService.java | 95 --
.../github/services/MockEventService.java | 69 --
.../github/services/MockIssueService.java | 65 -
.../github/services/MockPullRequestService.java | 136 ---
.../github/services/MockRepositoryService.java | 59 -
.../src/test/resources/log4j2.properties | 28 -
components/pom.xml | 1 -
.../org/apache/camel/main/components.properties | 1 -
coverage/pom.xml | 5 -
.../modules/ROOT/examples/json/github.json | 1 -
docs/components/modules/ROOT/nav.adoc | 1 -
.../modules/ROOT/pages/github-component.adoc | 1 -
.../ROOT/pages/camel-4x-upgrade-guide-4_21.adoc | 6 +
.../component/ComponentsBuilderFactory.java | 13 -
.../dsl/GithubComponentBuilderFactory.java | 206 ----
.../builder/endpoint/EndpointBuilderFactory.java | 1 -
.../camel/builder/endpoint/EndpointBuilders.java | 1 -
.../builder/endpoint/StaticEndpointBuilders.java | 54 -
.../endpoint/dsl/GitHubEndpointBuilderFactory.java | 1256 --------------------
.../camel-component-known-dependencies.properties | 1 -
parent/pom.xml | 6 -
71 files changed, 6 insertions(+), 5701 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 197b045cb6bf..5bbbc6d942ef 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -922,11 +922,6 @@
<artifactId>camel-git</artifactId>
<version>4.21.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-github</artifactId>
- <version>4.21.0-SNAPSHOT</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-github2</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index eba17d5cbe70..287d4123e9bf 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -787,11 +787,6 @@
<artifactId>camel-git</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-github</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-github2</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index 3171a8132a56..624daab24279 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -124,7 +124,6 @@ ftp
ftps
geocoder
git
-github
github2
google-bigquery
google-bigquery-sql
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/github.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/github.json
deleted file mode 100644
index 01d46da3835b..000000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/github.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "component": {
- "kind": "component",
- "name": "github",
- "title": "GitHub",
- "description": "Interact with the GitHub API.",
- "deprecated": true,
- "firstVersion": "2.15.0",
- "label": "file,cloud,api",
- "javaType": "org.apache.camel.component.github.GitHubComponent",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-github",
- "version": "4.21.0-SNAPSHOT",
- "scheme": "github",
- "extendsScheme": "",
- "syntax": "github:type\/branchName",
- "async": false,
- "api": false,
- "consumerOnly": false,
- "producerOnly": false,
- "lenientProperties": false,
- "browsable": false,
- "remote": true
- },
- "componentProperties": {
- "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "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 messages, or the like [...]
- "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 [...]
- "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
- "healthCheckConsumerEnabled": { "index": 3, "kind": "property", "displayName": "Health Check Consumer 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 consumer based health checks from this component" },
- "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 [...]
- "oauthToken": { "index": 5, "kind": "property", "displayName": "Oauth Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "GitHub OAuth token. Must be configured on either component or endpoint." }
- },
- "headers": {
- "GitHubPullRequest": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "PullRequest or Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The pull request", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_PULLREQUEST" },
- "GitHubInResponseTo": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the comment to reply to", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_INRESPONSETO" },
- "GitHubPullRequestHeadCommitSHA": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The sha of the head of the pull request", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_PULLREQUEST_HEAD_COMMIT_SHA" },
- "GitHubIssueTitle": { "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.github.GitHubConstants#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.github.GitHubConstants#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.github.GitHubConstants#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.github.GitHubConstants#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.github.GitHubConstants#GITHUB_COMMIT_URL" },
- "CamelGitHubEventPayload": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.eclipse.egit.github.core.event.EventPayload", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event payload", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_EVENT_PAYLOAD" }
- },
- "properties": {
- "type": { "index": 0, "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.github.GitHubType", "enum": [ "CLOSEPULLREQUEST", "PULLREQUESTCOMMENT", "COMMIT", "PULLREQUEST", "TAG", "PULLREQUESTSTATE", "PULLREQUESTFILES", "GETCOMMITFILE", "CREATEISSUE", "EVENT" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What git operation to execute" },
- "branchName": { "index": 1, "kind": "path", "displayName": "Branch Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of branch" },
- "repoName": { "index": 2, "kind": "parameter", "displayName": "Repo Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "GitHub repository name" },
- "repoOwner": { "index": 3, "kind": "parameter", "displayName": "Repo Owner", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "GitHub repository owner (organization)" },
- "commitMessageAsBody": { "index": 4, "kind": "parameter", "displayName": "Commit Message As Body", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the commit consumer should store the commit message or the raw org.eclipse.egit.github.core.RepositoryCommit object as the message body." },
- "sendEmptyMessageWhenIdle": { "index": 5, "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." },
- "startingSha": { "index": 6, "kind": "parameter", "displayName": "Starting Sha", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "last", "description": "The starting sha to use for polling commits with the commit consumer. The value can either be a sha for the sha to start from, or use beginning to start from the beginning, or last to start from the [...]
- "bridgeErrorHandler": { "index": 7, "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 [...]
- "eventFetchStrategy": { "index": 8, "kind": "parameter", "displayName": "Event Fetch Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.github.event.GitHubEventFetchStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To specify a custom strategy that configures how the EventsConsumer fetches events." },
- "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 def [...]
- "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 po [...]
- "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" },
- "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 produ [...]
- "backoffErrorThreshold": { "index": 16, "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": 17, "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": 18, "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 [...]
- "delay": { "index": 19, "kind": "parameter", "displayName": "Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 500, "description": "Milliseconds before the next poll." },
- "greedy": { "index": 20, "kind": "parameter", "displayName": "Greedy", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages." },
- "initialDelay": { "index": 21, "kind": "parameter", "displayName": "Initial Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "Milliseconds before the first poll starts." },
- "repeatCount": { "index": 22, "kind": "parameter", "displayName": "Repeat Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "description": "Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever." },
- "runLoggingLevel": { "index": 23, "kind": "parameter", "displayName": "Run Logging Level", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", "enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRACE", "description": "The consumer logs a start\/complete log line when it polls. This option allows you to configure the log [...]
- "scheduledExecutorService": { "index": 24, "kind": "parameter", "displayName": "Scheduled Executor Service", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.ScheduledExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "Allows for configuring a custom\/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool." },
- "scheduler": { "index": 25, "kind": "parameter", "displayName": "Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "none", "description": "To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler" },
- "schedulerProperties": { "index": 26, "kind": "parameter", "displayName": "Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. This i [...]
- "startScheduler": { "index": 27, "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": 28, "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": 29, "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." },
- "oauthToken": { "index": 30, "kind": "parameter", "displayName": "Oauth Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "GitHub OAuth token. Must be configured on either component or endpoint." }
- }
-}
diff --git a/components/camel-github/pom.xml b/components/camel-github/pom.xml
deleted file mode 100644
index 22e105993141..000000000000
--- a/components/camel-github/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel</groupId>
- <artifactId>components</artifactId>
- <version>4.21.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-github</artifactId>
- <packaging>jar</packaging>
- <name>Camel :: GitHub</name>
-
- <properties>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-support</artifactId>
- </dependency>
- <dependency>
- <groupId>org.eclipse.mylyn.github</groupId>
- <artifactId>org.eclipse.egit.github.core</artifactId>
- <version>${egit-github-core-version}</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
-
- <!-- testing -->
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-junit6</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-</project>
diff --git a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubComponentConfigurer.java b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubComponentConfigurer.java
deleted file mode 100644
index af2d99fb24cf..000000000000
--- a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubComponentConfigurer.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.component.github;
-
-import javax.annotation.processing.Generated;
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurerGetter;
-import org.apache.camel.spi.ConfigurerStrategy;
-import org.apache.camel.spi.GeneratedPropertyConfigurer;
-import org.apache.camel.util.CaseInsensitiveMap;
-import org.apache.camel.support.component.PropertyConfigurerSupport;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
-@SuppressWarnings("unchecked")
-public class GitHubComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
-
- @Override
- public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
- GitHubComponent target = (GitHubComponent) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "autowiredenabled":
- case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
- case "healthcheckconsumerenabled":
- case "healthCheckConsumerEnabled": target.setHealthCheckConsumerEnabled(property(camelContext, boolean.class, value)); return true;
- case "healthcheckproducerenabled":
- case "healthCheckProducerEnabled": target.setHealthCheckProducerEnabled(property(camelContext, boolean.class, value)); return true;
- case "lazystartproducer":
- case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
- case "oauthtoken":
- case "oauthToken": target.setOauthToken(property(camelContext, java.lang.String.class, value)); return true;
- default: return false;
- }
- }
-
- @Override
- public Class<?> getOptionType(String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "autowiredenabled":
- case "autowiredEnabled": return boolean.class;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return boolean.class;
- case "healthcheckconsumerenabled":
- case "healthCheckConsumerEnabled": return boolean.class;
- case "healthcheckproducerenabled":
- case "healthCheckProducerEnabled": return boolean.class;
- case "lazystartproducer":
- case "lazyStartProducer": return boolean.class;
- case "oauthtoken":
- case "oauthToken": return java.lang.String.class;
- default: return null;
- }
- }
-
- @Override
- public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
- GitHubComponent target = (GitHubComponent) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "autowiredenabled":
- case "autowiredEnabled": return target.isAutowiredEnabled();
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return target.isBridgeErrorHandler();
- case "healthcheckconsumerenabled":
- case "healthCheckConsumerEnabled": return target.isHealthCheckConsumerEnabled();
- case "healthcheckproducerenabled":
- case "healthCheckProducerEnabled": return target.isHealthCheckProducerEnabled();
- case "lazystartproducer":
- case "lazyStartProducer": return target.isLazyStartProducer();
- case "oauthtoken":
- case "oauthToken": return target.getOauthToken();
- default: return null;
- }
- }
-}
-
diff --git a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java
deleted file mode 100644
index a6f8aa8d9834..000000000000
--- a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointConfigurer.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.component.github;
-
-import javax.annotation.processing.Generated;
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
-import org.apache.camel.spi.PropertyConfigurerGetter;
-import org.apache.camel.spi.ConfigurerStrategy;
-import org.apache.camel.spi.GeneratedPropertyConfigurer;
-import org.apache.camel.util.CaseInsensitiveMap;
-import org.apache.camel.support.component.PropertyConfigurerSupport;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
-@SuppressWarnings("unchecked")
-public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
-
- @Override
- public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
- GitHubEndpoint target = (GitHubEndpoint) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "backofferrorthreshold":
- case "backoffErrorThreshold": target.setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
- case "backoffidlethreshold":
- case "backoffIdleThreshold": target.setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
- case "backoffmultiplier":
- case "backoffMultiplier": target.setBackoffMultiplier(property(camelContext, int.class, value)); return true;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
- case "commitmessageasbody":
- case "commitMessageAsBody": target.setCommitMessageAsBody(property(camelContext, boolean.class, value)); return true;
- case "delay": target.setDelay(property(camelContext, long.class, value)); return true;
- case "encoding": target.setEncoding(property(camelContext, java.lang.String.class, value)); return true;
- case "eventfetchstrategy":
- case "eventFetchStrategy": target.setEventFetchStrategy(property(camelContext, org.apache.camel.component.github.event.GitHubEventFetchStrategy.class, value)); return true;
- case "exceptionhandler":
- case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
- case "exchangepattern":
- case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
- case "greedy": target.setGreedy(property(camelContext, boolean.class, value)); return true;
- case "initialdelay":
- case "initialDelay": target.setInitialDelay(property(camelContext, long.class, value)); return true;
- case "lazystartproducer":
- case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
- case "oauthtoken":
- case "oauthToken": target.setOauthToken(property(camelContext, java.lang.String.class, value)); return true;
- case "pollstrategy":
- case "pollStrategy": target.setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
- case "repeatcount":
- case "repeatCount": target.setRepeatCount(property(camelContext, long.class, value)); return true;
- case "reponame":
- case "repoName": target.setRepoName(property(camelContext, java.lang.String.class, value)); return true;
- case "repoowner":
- case "repoOwner": target.setRepoOwner(property(camelContext, java.lang.String.class, value)); return true;
- case "runlogginglevel":
- case "runLoggingLevel": target.setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
- case "scheduledexecutorservice":
- case "scheduledExecutorService": target.setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
- case "scheduler": target.setScheduler(property(camelContext, java.lang.Object.class, value)); return true;
- case "schedulerproperties":
- case "schedulerProperties": target.setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
- case "sendemptymessagewhenidle":
- case "sendEmptyMessageWhenIdle": target.setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
- case "startscheduler":
- case "startScheduler": target.setStartScheduler(property(camelContext, boolean.class, value)); return true;
- case "startingsha":
- case "startingSha": target.setStartingSha(property(camelContext, java.lang.String.class, value)); return true;
- case "state": target.setState(property(camelContext, java.lang.String.class, value)); return true;
- case "targeturl":
- case "targetUrl": target.setTargetUrl(property(camelContext, java.lang.String.class, value)); return true;
- case "timeunit":
- case "timeUnit": target.setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
- case "usefixeddelay":
- case "useFixedDelay": target.setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
- default: return false;
- }
- }
-
- @Override
- public Class<?> getOptionType(String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "backofferrorthreshold":
- case "backoffErrorThreshold": return int.class;
- case "backoffidlethreshold":
- case "backoffIdleThreshold": return int.class;
- case "backoffmultiplier":
- case "backoffMultiplier": return int.class;
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return boolean.class;
- case "commitmessageasbody":
- case "commitMessageAsBody": return boolean.class;
- case "delay": return long.class;
- case "encoding": return java.lang.String.class;
- case "eventfetchstrategy":
- case "eventFetchStrategy": return org.apache.camel.component.github.event.GitHubEventFetchStrategy.class;
- case "exceptionhandler":
- case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class;
- case "exchangepattern":
- case "exchangePattern": return org.apache.camel.ExchangePattern.class;
- case "greedy": return boolean.class;
- case "initialdelay":
- case "initialDelay": return long.class;
- case "lazystartproducer":
- case "lazyStartProducer": return boolean.class;
- case "oauthtoken":
- case "oauthToken": return java.lang.String.class;
- case "pollstrategy":
- case "pollStrategy": return org.apache.camel.spi.PollingConsumerPollStrategy.class;
- case "repeatcount":
- case "repeatCount": return long.class;
- case "reponame":
- case "repoName": return java.lang.String.class;
- case "repoowner":
- case "repoOwner": return java.lang.String.class;
- case "runlogginglevel":
- case "runLoggingLevel": return org.apache.camel.LoggingLevel.class;
- case "scheduledexecutorservice":
- case "scheduledExecutorService": return java.util.concurrent.ScheduledExecutorService.class;
- case "scheduler": return java.lang.Object.class;
- case "schedulerproperties":
- case "schedulerProperties": return java.util.Map.class;
- case "sendemptymessagewhenidle":
- case "sendEmptyMessageWhenIdle": return boolean.class;
- case "startscheduler":
- case "startScheduler": return boolean.class;
- case "startingsha":
- case "startingSha": return java.lang.String.class;
- case "state": return java.lang.String.class;
- case "targeturl":
- case "targetUrl": return java.lang.String.class;
- case "timeunit":
- case "timeUnit": return java.util.concurrent.TimeUnit.class;
- case "usefixeddelay":
- case "useFixedDelay": return boolean.class;
- default: return null;
- }
- }
-
- @Override
- public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
- GitHubEndpoint target = (GitHubEndpoint) obj;
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "backofferrorthreshold":
- case "backoffErrorThreshold": return target.getBackoffErrorThreshold();
- case "backoffidlethreshold":
- case "backoffIdleThreshold": return target.getBackoffIdleThreshold();
- case "backoffmultiplier":
- case "backoffMultiplier": return target.getBackoffMultiplier();
- case "bridgeerrorhandler":
- case "bridgeErrorHandler": return target.isBridgeErrorHandler();
- case "commitmessageasbody":
- case "commitMessageAsBody": return target.isCommitMessageAsBody();
- case "delay": return target.getDelay();
- case "encoding": return target.getEncoding();
- case "eventfetchstrategy":
- case "eventFetchStrategy": return target.getEventFetchStrategy();
- case "exceptionhandler":
- case "exceptionHandler": return target.getExceptionHandler();
- case "exchangepattern":
- case "exchangePattern": return target.getExchangePattern();
- case "greedy": return target.isGreedy();
- case "initialdelay":
- case "initialDelay": return target.getInitialDelay();
- case "lazystartproducer":
- case "lazyStartProducer": return target.isLazyStartProducer();
- case "oauthtoken":
- case "oauthToken": return target.getOauthToken();
- case "pollstrategy":
- case "pollStrategy": return target.getPollStrategy();
- case "repeatcount":
- case "repeatCount": return target.getRepeatCount();
- case "reponame":
- case "repoName": return target.getRepoName();
- case "repoowner":
- case "repoOwner": return target.getRepoOwner();
- case "runlogginglevel":
- case "runLoggingLevel": return target.getRunLoggingLevel();
- case "scheduledexecutorservice":
- case "scheduledExecutorService": return target.getScheduledExecutorService();
- case "scheduler": return target.getScheduler();
- case "schedulerproperties":
- case "schedulerProperties": return target.getSchedulerProperties();
- case "sendemptymessagewhenidle":
- case "sendEmptyMessageWhenIdle": return target.isSendEmptyMessageWhenIdle();
- case "startscheduler":
- case "startScheduler": return target.isStartScheduler();
- case "startingsha":
- case "startingSha": return target.getStartingSha();
- case "state": return target.getState();
- case "targeturl":
- case "targetUrl": return target.getTargetUrl();
- case "timeunit":
- case "timeUnit": return target.getTimeUnit();
- case "usefixeddelay":
- case "useFixedDelay": return target.isUseFixedDelay();
- default: return null;
- }
- }
-
- @Override
- public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
- switch (ignoreCase ? name.toLowerCase() : name) {
- case "schedulerproperties":
- case "schedulerProperties": return java.lang.Object.class;
- default: return null;
- }
- }
-}
-
diff --git a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java b/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java
deleted file mode 100644
index 3448c47e6f1d..000000000000
--- a/components/camel-github/src/generated/java/org/apache/camel/component/github/GitHubEndpointUriFactory.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-package org.apache.camel.component.github;
-
-import javax.annotation.processing.Generated;
-import java.net.URISyntaxException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.camel.spi.EndpointUriFactory;
-
-/**
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo")
-public class GitHubEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
-
- private static final String BASE = ":type/branchName";
-
- private static final Set<String> PROPERTY_NAMES;
- private static final Set<String> SECRET_PROPERTY_NAMES;
- private static final Map<String, String> MULTI_VALUE_PREFIXES;
- static {
- Set<String> props = new HashSet<>(31);
- props.add("backoffErrorThreshold");
- props.add("backoffIdleThreshold");
- props.add("backoffMultiplier");
- props.add("branchName");
- props.add("bridgeErrorHandler");
- props.add("commitMessageAsBody");
- props.add("delay");
- props.add("encoding");
- props.add("eventFetchStrategy");
- props.add("exceptionHandler");
- props.add("exchangePattern");
- props.add("greedy");
- props.add("initialDelay");
- props.add("lazyStartProducer");
- props.add("oauthToken");
- props.add("pollStrategy");
- props.add("repeatCount");
- props.add("repoName");
- props.add("repoOwner");
- props.add("runLoggingLevel");
- props.add("scheduledExecutorService");
- props.add("scheduler");
- props.add("schedulerProperties");
- props.add("sendEmptyMessageWhenIdle");
- props.add("startScheduler");
- props.add("startingSha");
- props.add("state");
- props.add("targetUrl");
- props.add("timeUnit");
- props.add("type");
- props.add("useFixedDelay");
- PROPERTY_NAMES = Collections.unmodifiableSet(props);
- Set<String> secretProps = new HashSet<>(1);
- secretProps.add("oauthToken");
- SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
- Map<String, String> prefixes = new HashMap<>(1);
- prefixes.put("schedulerProperties", "scheduler.");
- MULTI_VALUE_PREFIXES = Collections.unmodifiableMap(prefixes);
- }
-
- @Override
- public boolean isEnabled(String scheme) {
- return "github".equals(scheme);
- }
-
- @Override
- public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
- String syntax = scheme + BASE;
- String uri = syntax;
-
- Map<String, Object> copy = new HashMap<>(properties);
-
- uri = buildPathParameter(syntax, uri, "type", null, true, copy);
- uri = buildPathParameter(syntax, uri, "branchName", null, false, copy);
- uri = buildQueryParameters(uri, copy, encode);
- return uri;
- }
-
- @Override
- public Set<String> propertyNames() {
- return PROPERTY_NAMES;
- }
-
- @Override
- public Set<String> secretPropertyNames() {
- return SECRET_PROPERTY_NAMES;
- }
-
- @Override
- public Map<String, String> multiValuePrefixes() {
- return MULTI_VALUE_PREFIXES;
- }
-
- @Override
- public boolean isLenientProperties() {
- return false;
- }
-}
-
diff --git a/components/camel-github/src/generated/resources/META-INF/org/apache/camel/component/github/github.json b/components/camel-github/src/generated/resources/META-INF/org/apache/camel/component/github/github.json
deleted file mode 100644
index 01d46da3835b..000000000000
--- a/components/camel-github/src/generated/resources/META-INF/org/apache/camel/component/github/github.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "component": {
- "kind": "component",
- "name": "github",
- "title": "GitHub",
- "description": "Interact with the GitHub API.",
- "deprecated": true,
- "firstVersion": "2.15.0",
- "label": "file,cloud,api",
- "javaType": "org.apache.camel.component.github.GitHubComponent",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-github",
- "version": "4.21.0-SNAPSHOT",
- "scheme": "github",
- "extendsScheme": "",
- "syntax": "github:type\/branchName",
- "async": false,
- "api": false,
- "consumerOnly": false,
- "producerOnly": false,
- "lenientProperties": false,
- "browsable": false,
- "remote": true
- },
- "componentProperties": {
- "bridgeErrorHandler": { "index": 0, "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "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 messages, or the like [...]
- "lazyStartProducer": { "index": 1, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 [...]
- "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching t [...]
- "healthCheckConsumerEnabled": { "index": 3, "kind": "property", "displayName": "Health Check Consumer 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 consumer based health checks from this component" },
- "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 [...]
- "oauthToken": { "index": 5, "kind": "property", "displayName": "Oauth Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "GitHub OAuth token. Must be configured on either component or endpoint." }
- },
- "headers": {
- "GitHubPullRequest": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "PullRequest or Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The pull request", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_PULLREQUEST" },
- "GitHubInResponseTo": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the comment to reply to", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_INRESPONSETO" },
- "GitHubPullRequestHeadCommitSHA": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The sha of the head of the pull request", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_PULLREQUEST_HEAD_COMMIT_SHA" },
- "GitHubIssueTitle": { "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.github.GitHubConstants#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.github.GitHubConstants#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.github.GitHubConstants#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.github.GitHubConstants#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.github.GitHubConstants#GITHUB_COMMIT_URL" },
- "CamelGitHubEventPayload": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "org.eclipse.egit.github.core.event.EventPayload", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The event payload", "constantName": "org.apache.camel.component.github.GitHubConstants#GITHUB_EVENT_PAYLOAD" }
- },
- "properties": {
- "type": { "index": 0, "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "enum", "javaType": "org.apache.camel.component.github.GitHubType", "enum": [ "CLOSEPULLREQUEST", "PULLREQUESTCOMMENT", "COMMIT", "PULLREQUEST", "TAG", "PULLREQUESTSTATE", "PULLREQUESTFILES", "GETCOMMITFILE", "CREATEISSUE", "EVENT" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What git operation to execute" },
- "branchName": { "index": 1, "kind": "path", "displayName": "Branch Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of branch" },
- "repoName": { "index": 2, "kind": "parameter", "displayName": "Repo Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "GitHub repository name" },
- "repoOwner": { "index": 3, "kind": "parameter", "displayName": "Repo Owner", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "GitHub repository owner (organization)" },
- "commitMessageAsBody": { "index": 4, "kind": "parameter", "displayName": "Commit Message As Body", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the commit consumer should store the commit message or the raw org.eclipse.egit.github.core.RepositoryCommit object as the message body." },
- "sendEmptyMessageWhenIdle": { "index": 5, "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." },
- "startingSha": { "index": 6, "kind": "parameter", "displayName": "Starting Sha", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "last", "description": "The starting sha to use for polling commits with the commit consumer. The value can either be a sha for the sha to start from, or use beginning to start from the beginning, or last to start from the [...]
- "bridgeErrorHandler": { "index": 7, "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 [...]
- "eventFetchStrategy": { "index": 8, "kind": "parameter", "displayName": "Event Fetch Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.github.event.GitHubEventFetchStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "To specify a custom strategy that configures how the EventsConsumer fetches events." },
- "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 def [...]
- "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 po [...]
- "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" },
- "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 produ [...]
- "backoffErrorThreshold": { "index": 16, "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": 17, "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": 18, "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 [...]
- "delay": { "index": 19, "kind": "parameter", "displayName": "Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 500, "description": "Milliseconds before the next poll." },
- "greedy": { "index": 20, "kind": "parameter", "displayName": "Greedy", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages." },
- "initialDelay": { "index": 21, "kind": "parameter", "displayName": "Initial Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 1000, "description": "Milliseconds before the first poll starts." },
- "repeatCount": { "index": 22, "kind": "parameter", "displayName": "Repeat Count", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 0, "description": "Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever." },
- "runLoggingLevel": { "index": 23, "kind": "parameter", "displayName": "Run Logging Level", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "enum", "javaType": "org.apache.camel.LoggingLevel", "enum": [ "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "OFF" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TRACE", "description": "The consumer logs a start\/complete log line when it polls. This option allows you to configure the log [...]
- "scheduledExecutorService": { "index": 24, "kind": "parameter", "displayName": "Scheduled Executor Service", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.ScheduledExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "Allows for configuring a custom\/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool." },
- "scheduler": { "index": 25, "kind": "parameter", "displayName": "Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "none", "description": "To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or quartz for built in scheduler" },
- "schedulerProperties": { "index": 26, "kind": "parameter", "displayName": "Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "description": "To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. This i [...]
- "startScheduler": { "index": 27, "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": 28, "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": 29, "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." },
- "oauthToken": { "index": 30, "kind": "parameter", "displayName": "Oauth Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "security": "secret", "description": "GitHub OAuth token. Must be configured on either component or endpoint." }
- }
-}
diff --git a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/component.properties
deleted file mode 100644
index 9010f5c9beec..000000000000
--- a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/component.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-components=github
-groupId=org.apache.camel
-artifactId=camel-github
-version=4.21.0-SNAPSHOT
-projectName=Camel :: GitHub
-projectDescription=Camel Components
diff --git a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/component/github b/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/component/github
deleted file mode 100644
index a4b7707b45ef..000000000000
--- a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/component/github
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.github.GitHubComponent
diff --git a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/configurer/github-component b/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/configurer/github-component
deleted file mode 100644
index a3b42833a1a5..000000000000
--- a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/configurer/github-component
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.github.GitHubComponentConfigurer
diff --git a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/configurer/github-endpoint b/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/configurer/github-endpoint
deleted file mode 100644
index 5f67e756e90e..000000000000
--- a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/configurer/github-endpoint
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.github.GitHubEndpointConfigurer
diff --git a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/urifactory/github-endpoint b/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/urifactory/github-endpoint
deleted file mode 100644
index 882510bea5e1..000000000000
--- a/components/camel-github/src/generated/resources/META-INF/services/org/apache/camel/urifactory/github-endpoint
+++ /dev/null
@@ -1,2 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-class=org.apache.camel.component.github.GitHubEndpointUriFactory
diff --git a/components/camel-github/src/main/docs/github-component.adoc b/components/camel-github/src/main/docs/github-component.adoc
deleted file mode 100644
index d6334f416ce6..000000000000
--- a/components/camel-github/src/main/docs/github-component.adoc
+++ /dev/null
@@ -1,117 +0,0 @@
-= GitHub Component (deprecated)
-:doctitle: GitHub
-:shortname: github
-:artifactid: camel-github
-:description: Interact with the GitHub API.
-:since: 2.15
-:supportlevel: Stable-deprecated
-:deprecated: *deprecated*
-:tabs-sync-option:
-:component-header: Both producer and consumer are supported
-//Manually maintained attributes
-:camel-spring-boot-name: github
-
-*Since Camel {since}*
-
-*{component-header}*
-
-[NOTE]
-====
-This component is deprecated since Camel 4.18 and will be removed in a future release.
-Please use the xref:github2-component.adoc[GitHub2] component instead, which uses the official https://github.com/hub4j/github-api[GitHub API for Java] library.
-====
-
-The GitHub component interacts with the GitHub API by
-encapsulating https://git.eclipse.org/c/egit/egit-github.git/[egit-github]. It
-currently provides polling for new pull requests, pull request comments,
-tags, and commits. It is also able to produce comments on pull
-requests, as well as close the pull request entirely.
-
-Rather than webhooks, this endpoint relies on simple polling. Reasons
-include:
-
-* Concern for reliability/stability
-* The types of payloads we're polling aren't typically large (plus,
-paging is available in the API)
-* The need to support apps running somewhere not publicly accessible
-where a webhook would fail
-
-Note that the GitHub API is fairly expansive. Therefore, this component
-could be easily expanded to provide additional interactions.
-
-Maven users will need to add the following dependency to their pom.xml
-for this component:
-
-[source,xml]
------------------------------------------
-<dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-github</artifactId>
- <version>${camel-version}</version>
-</dependency>
------------------------------------------
-
-== URI format
-
----------------------------
-github://endpoint[?options]
----------------------------
-
-
-// component options: START
-include::partial$component-configure-options.adoc[]
-include::partial$component-endpoint-options.adoc[]
-include::partial$component-endpoint-headers.adoc[]
-// component options: END
-
-== Usage
-
-=== Configuring authentication
-
-The GitHub component requires to be configured with an authentication token on either the component or endpoint level.
-
-For example, to set it on the component:
-
-[source,java]
-----
-GitHubComponent ghc = context.getComponent("github", GitHubComponent.class);
-ghc.setOauthToken("mytoken");
-----
-
-=== Consumer Endpoints:
-
-[width="100%",cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Endpoint |Context |Body Type
-
-|pullRequest |polling |`org.eclipse.egit.github.core.PullRequest`
-
-|pullRequestComment |polling |`org.eclipse.egit.github.core.Comment` (comment on the general pull
-request discussion) or `org.eclipse.egit.github.core.CommitComment`
-(inline comment on a pull request diff)
-
-|tag |polling |`org.eclipse.egit.github.core.RepositoryTag`
-
-|commit |polling |`org.eclipse.egit.github.core.RepositoryCommit` or `String` with commit message and headers with some metadata.
-This can be configured by the `commitMessageAsBody` option.
-|=======================================================================
-
-=== Producer Endpoints:
-
-[width="100%",cols="20%,20%,60%",options="header",]
-|=======================================================================
-|Endpoint |Body |Message Headers
-
-|pullRequestComment |String (comment text) | - `GitHubPullRequest` (integer) (REQUIRED): Pull request number.
-
-- `GitHubInResponseTo` (integer): Required if responding to another inline
-comment on the pull request diff. If left off, a general comment on the
-pull request discussion is assumed.
-
-|closePullRequest |none | - `GitHubPullRequest` (integer) (REQUIRED): Pull request number.
-
-|createIssue |String (issue body text) | - `GitHubIssueTitle` (String) (REQUIRED): Issue Title.
-|=======================================================================
-
-
-include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubComponent.java b/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubComponent.java
deleted file mode 100644
index 12a66c9b9e79..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubComponent.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github;
-
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.annotations.Component;
-import org.apache.camel.support.HealthCheckComponent;
-
-/**
- * Represents the component that manages {@link GitHubEndpoint}.
- *
- * @deprecated since 4.18, use {@link org.apache.camel.component.github2.GitHub2Component} (camel-github2) instead
- */
-@Component("github")
-@Deprecated(since = "4.18")
-public class GitHubComponent extends HealthCheckComponent {
-
- @Metadata(label = "security", security = "secret")
- private String oauthToken;
-
- @Override
- protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
- GitHubEndpoint endpoint = new GitHubEndpoint(uri, this);
- endpoint.setOauthToken(oauthToken);
-
- setProperties(endpoint, parameters);
-
- String[] parts = remaining.split("/");
- if (parts.length >= 1) {
- String s = parts[0];
- GitHubType type = getCamelContext().getTypeConverter().convertTo(GitHubType.class, s);
- endpoint.setType(type);
- if (parts.length > 1) {
- s = parts[1];
- endpoint.setBranchName(s);
- }
- }
- return endpoint;
- }
-
- public String getOauthToken() {
- return oauthToken;
- }
-
- /**
- * GitHub OAuth token. Must be configured on either component or endpoint.
- */
- public void setOauthToken(String oauthToken) {
- this.oauthToken = oauthToken;
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubConstants.java b/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubConstants.java
deleted file mode 100644
index 42a90b4e81fd..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubConstants.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github;
-
-import org.apache.camel.spi.Metadata;
-
-public interface GitHubConstants {
-
- String GITHUB_REPOSITORY_SERVICE = "githubRepositoryService";
-
- String GITHUB_COMMIT_SERVICE = "githubCommitService";
-
- String GITHUB_DATA_SERVICE = "githubDataService";
-
- String GITHUB_PULL_REQUEST_SERVICE = "githubPullRequestService";
-
- String GITHUB_ISSUE_SERVICE = "githbIssueService";
- @Metadata(description = "The pull request", javaType = "PullRequest or Integer")
- String GITHUB_PULLREQUEST = "GitHubPullRequest";
- @Metadata(label = "producer", description = "The id of the comment to reply to", javaType = "Integer")
- String GITHUB_INRESPONSETO = "GitHubInResponseTo";
- @Metadata(description = "The sha of the head of the pull request", javaType = "String")
- String GITHUB_PULLREQUEST_HEAD_COMMIT_SHA = "GitHubPullRequestHeadCommitSHA";
- @Metadata(label = "producer", description = "The title of the issue", javaType = "String")
- String GITHUB_ISSUE_TITLE = "GitHubIssueTitle";
-
- String GITHUB_EVENT_SERVICE = "GitHubEventService";
- @Metadata(label = "consumer", description = "The commit author", javaType = "String")
- 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")
- String GITHUB_COMMIT_SHA = "CamelGitHubCommitSha";
- @Metadata(label = "consumer", description = "The commit URL", javaType = "String")
- String GITHUB_COMMIT_URL = "CamelGitHubCommitUrl";
- @Metadata(label = "consumer", description = "The event payload",
- javaType = "org.eclipse.egit.github.core.event.EventPayload")
- String GITHUB_EVENT_PAYLOAD = "CamelGitHubEventPayload";
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java b/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java
deleted file mode 100644
index a202fc85ae01..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubEndpoint.java
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github;
-
-import org.apache.camel.Category;
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.Producer;
-import org.apache.camel.component.github.consumer.CommitConsumer;
-import org.apache.camel.component.github.consumer.EventsConsumer;
-import org.apache.camel.component.github.consumer.PullRequestCommentConsumer;
-import org.apache.camel.component.github.consumer.PullRequestConsumer;
-import org.apache.camel.component.github.consumer.TagConsumer;
-import org.apache.camel.component.github.event.GitHubEventFetchStrategy;
-import org.apache.camel.component.github.producer.ClosePullRequestProducer;
-import org.apache.camel.component.github.producer.CreateIssueProducer;
-import org.apache.camel.component.github.producer.GetCommitFileProducer;
-import org.apache.camel.component.github.producer.PullRequestCommentProducer;
-import org.apache.camel.component.github.producer.PullRequestFilesProducer;
-import org.apache.camel.component.github.producer.PullRequestStateProducer;
-import org.apache.camel.spi.EndpointServiceLocation;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.spi.UriEndpoint;
-import org.apache.camel.spi.UriParam;
-import org.apache.camel.spi.UriPath;
-import org.apache.camel.support.ScheduledPollEndpoint;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StringHelper;
-
-/**
- * Interact with the GitHub API.
- *
- * The endpoint encapsulates portions of the GitHub API, relying on the org.eclipse.egit.github.core Java SDK. Available
- * endpoint URIs include:
- *
- * CONSUMERS github://pullRequest (new pull requests) github://pullRequestComment (new pull request comments)
- * github://commit/[branch] (new commits) github://tag (new tags)
- *
- * PRODUCERS github://pullRequestComment (create a new pull request comment; see PullRequestCommentProducer for header
- * requirements)
- *
- * The endpoints will respond with org.eclipse.egit.github.core-provided POJOs (PullRequest, CommitComment,
- * RepositoryTag, RepositoryCommit, etc.)
- *
- * Note: Rather than webhooks, this endpoint relies on simple polling. Reasons include: - concerned about
- * reliability/stability if this somehow relied on an exposed, embedded server (Jetty?) - the types of payloads we're
- * polling aren't typically large (plus, paging is available in the API) - need to support apps running somewhere not
- * publicly accessible where a webhook would fail
- *
- * @deprecated since 4.18, use {@link org.apache.camel.component.github2.GitHub2Endpoint} (camel-github2) instead
- */
-@UriEndpoint(firstVersion = "2.15.0", scheme = "github", title = "GitHub", syntax = "github:type/branchName",
- category = { Category.FILE, Category.CLOUD, Category.API }, headersClass = GitHubConstants.class)
-@Deprecated(since = "4.18")
-public class GitHubEndpoint extends ScheduledPollEndpoint implements EndpointServiceLocation {
-
- @UriPath
- @Metadata(required = true)
- private GitHubType type;
- @UriPath(label = "consumer")
- private String branchName;
- @UriParam(label = "consumer", defaultValue = "last")
- private String startingSha = "last";
- @UriParam(label = "consumer", defaultValue = "true")
- private boolean commitMessageAsBody = true;
- @UriParam(label = "security", security = "secret")
- private String oauthToken;
- @UriParam
- @Metadata(required = true)
- private String repoOwner;
- @UriParam
- @Metadata(required = true)
- private String repoName;
- @UriParam(label = "producer", enums = "error,failure,pending,success")
- private String state;
- @UriParam(label = "producer")
- private String targetUrl;
- @UriParam(label = "producer")
- private String encoding;
- @UriParam(label = "consumer,advanced")
- private GitHubEventFetchStrategy eventFetchStrategy;
-
- public GitHubEndpoint(String uri, GitHubComponent component) {
- super(uri, component);
- }
-
- @Override
- public String getServiceUrl() {
- return "api.github.com";
- }
-
- @Override
- public String getServiceProtocol() {
- return "rest";
- }
-
- @Override
- public Producer createProducer() throws Exception {
- if (type == GitHubType.CLOSEPULLREQUEST) {
- return new ClosePullRequestProducer(this);
- } else if (type == GitHubType.PULLREQUESTCOMMENT) {
- return new PullRequestCommentProducer(this);
- } else if (type == GitHubType.PULLREQUESTSTATE) {
- return new PullRequestStateProducer(this);
- } else if (type == GitHubType.PULLREQUESTFILES) {
- return new PullRequestFilesProducer(this);
- } else if (type == GitHubType.GETCOMMITFILE) {
- return new GetCommitFileProducer(this);
- } else if (type == GitHubType.CREATEISSUE) {
- return new CreateIssueProducer(this);
- }
- throw new IllegalArgumentException("Cannot create producer with type " + type);
- }
-
- @Override
- public Consumer createConsumer(Processor processor) throws Exception {
- Consumer consumer = null;
- if (type == GitHubType.COMMIT) {
- StringHelper.notEmpty(branchName, "branchName", this);
- consumer = new CommitConsumer(this, processor, branchName, startingSha);
- } else if (type == GitHubType.PULLREQUEST) {
- consumer = new PullRequestConsumer(this, processor);
- } else if (type == GitHubType.PULLREQUESTCOMMENT) {
- consumer = new PullRequestCommentConsumer(this, processor);
- } else if (type == GitHubType.TAG) {
- consumer = new TagConsumer(this, processor);
- } else if (type == GitHubType.EVENT) {
- consumer = new EventsConsumer(this, processor);
- }
-
- if (consumer == null) {
- throw new IllegalArgumentException("Cannot create consumer with type " + type);
- }
-
- configureConsumer(consumer);
- return consumer;
- }
-
- public GitHubType getType() {
- return type;
- }
-
- /**
- * What git operation to execute
- */
- public void setType(GitHubType type) {
- this.type = type;
- }
-
- public String getBranchName() {
- return branchName;
- }
-
- /**
- * Name of branch
- */
- public void setBranchName(String branchName) {
- this.branchName = branchName;
- }
-
- public boolean isCommitMessageAsBody() {
- return commitMessageAsBody;
- }
-
- /**
- * Whether the commit consumer should store the commit message or the raw
- * org.eclipse.egit.github.core.RepositoryCommit object as the message body.
- */
- public void setCommitMessageAsBody(boolean commitMessageAsBody) {
- this.commitMessageAsBody = commitMessageAsBody;
- }
-
- public String getStartingSha() {
- return startingSha;
- }
-
- /**
- * The starting sha to use for polling commits with the commit consumer.
- *
- * The value can either be a sha for the sha to start from, or use <tt>beginning</tt> to start from the beginning,
- * or <tt>last</tt> to start from the last commit.
- */
- public void setStartingSha(String startingSha) {
- this.startingSha = startingSha;
- }
-
- public String getOauthToken() {
- return oauthToken;
- }
-
- /**
- * GitHub OAuth token. Must be configured on either component or endpoint.
- */
- public void setOauthToken(String oauthToken) {
- this.oauthToken = oauthToken;
- }
-
- public String getRepoOwner() {
- return repoOwner;
- }
-
- /**
- * GitHub repository owner (organization)
- */
- public void setRepoOwner(String repoOwner) {
- this.repoOwner = repoOwner;
- }
-
- public String getRepoName() {
- return repoName;
- }
-
- /**
- * GitHub repository name
- */
- public void setRepoName(String repoName) {
- this.repoName = repoName;
- }
-
- public String getState() {
- return state;
- }
-
- /**
- * To set git commit status state
- */
- public void setState(String state) {
- this.state = state;
- }
-
- public String getTargetUrl() {
- return targetUrl;
- }
-
- /**
- * To set git commit status target url
- */
- public void setTargetUrl(String targetUrl) {
- this.targetUrl = targetUrl;
- }
-
- public String getEncoding() {
- return encoding;
- }
-
- /**
- * To use the given encoding when getting a git commit file
- */
- public void setEncoding(String encoding) {
- this.encoding = encoding;
- }
-
- public GitHubEventFetchStrategy getEventFetchStrategy() {
- return eventFetchStrategy;
- }
-
- /**
- * To specify a custom strategy that configures how the EventsConsumer fetches events.
- */
- public void setEventFetchStrategy(GitHubEventFetchStrategy eventFetchStrategy) {
- this.eventFetchStrategy = eventFetchStrategy;
- }
-
- @Override
- protected void doInit() throws Exception {
- super.doInit();
-
- ObjectHelper.notNull(oauthToken, "oauthToken");
- }
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubType.java b/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubType.java
deleted file mode 100644
index 330536b796f3..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/GitHubType.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github;
-
-public enum GitHubType {
-
- CLOSEPULLREQUEST,
- PULLREQUESTCOMMENT,
- COMMIT,
- PULLREQUEST,
- TAG,
- PULLREQUESTSTATE,
- PULLREQUESTFILES,
- GETCOMMITFILE,
- CREATEISSUE,
- EVENT;
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/AbstractGitHubConsumer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/AbstractGitHubConsumer.java
deleted file mode 100644
index 596c6ebe605e..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/AbstractGitHubConsumer.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.Queue;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePropertyKey;
-import org.apache.camel.Processor;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.support.ScheduledBatchPollingConsumer;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.service.GitHubService;
-import org.eclipse.egit.github.core.service.RepositoryService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AbstractGitHubConsumer extends ScheduledBatchPollingConsumer {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractGitHubConsumer.class);
-
- private final GitHubEndpoint endpoint;
-
- private RepositoryService repositoryService;
-
- private Repository repository;
-
- protected AbstractGitHubConsumer(GitHubEndpoint endpoint, Processor processor) throws Exception {
- super(endpoint, processor);
- this.endpoint = endpoint;
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_REPOSITORY_SERVICE);
- if (service != null) {
- LOG.debug("Using RepositoryService found in registry {}", service.getClass().getCanonicalName());
- repositoryService = (RepositoryService) service;
- } else {
- repositoryService = new RepositoryService();
- }
-
- initService(repositoryService);
- repository = repositoryService.getRepository(endpoint.getRepoOwner(), endpoint.getRepoName());
- }
-
- protected void initService(GitHubService service) {
- service.getClient().setOAuth2Token(endpoint.getOauthToken());
- }
-
- protected RepositoryService getRepositoryService() {
- return repositoryService;
- }
-
- protected Repository getRepository() {
- return repository;
- }
-
- @Override
- public int processBatch(Queue<Object> exchanges) throws Exception {
- int total = exchanges.size();
- int answer = total;
- if (this.maxMessagesPerPoll > 0 && total > this.maxMessagesPerPoll) {
- LOG.debug("Limiting to maximum messages to poll {} as there were {} messages in this poll.",
- this.maxMessagesPerPoll, total);
- total = this.maxMessagesPerPoll;
- }
-
- for (int index = 0; index < total && this.isBatchAllowed(); ++index) {
- Exchange exchange = (Exchange) exchanges.poll();
- exchange.setProperty(ExchangePropertyKey.BATCH_INDEX, index);
- exchange.setProperty(ExchangePropertyKey.BATCH_SIZE, total);
- exchange.setProperty(ExchangePropertyKey.BATCH_COMPLETE, index == total - 1);
- this.pendingExchanges = total - index - 1;
- getProcessor().process(exchange);
- }
-
- return answer;
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/CommitConsumer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/CommitConsumer.java
deleted file mode 100644
index 0300d6ebd60c..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/CommitConsumer.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.ArrayDeque;
-import java.util.List;
-import java.util.Queue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.ExchangePropertyKey;
-import org.apache.camel.Processor;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.eclipse.egit.github.core.service.CommitService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class CommitConsumer extends AbstractGitHubConsumer {
-
- private static final Logger LOG = LoggerFactory.getLogger(CommitConsumer.class);
- private static final int CAPACITY = 1000; // in case there is a lot of commits and this runs not very frequently
-
- private CommitService commitService;
- private final String branchName;
- private final String startingSha;
-
- // keep a chunk of the last 100 hashes, so we can filter out duplicates
- private final Queue<String> commitHashes = new LinkedBlockingQueue<>(CAPACITY);
- private volatile String lastSha;
- private boolean started = false;
-
- public CommitConsumer(GitHubEndpoint endpoint, Processor processor, String branchName,
- String startingSha) throws Exception {
- super(endpoint, processor);
- this.branchName = branchName;
- this.startingSha = startingSha;
- }
-
- @Override
- public GitHubEndpoint getEndpoint() {
- return (GitHubEndpoint) super.getEndpoint();
- }
-
- @Override
- protected void doInit() throws Exception {
- super.doInit();
-
- Registry registry = getEndpoint().getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_COMMIT_SERVICE);
- if (service != null) {
- LOG.debug("Using CommitService found in registry {}", service.getClass().getCanonicalName());
- commitService = (CommitService) service;
- } else {
- commitService = new CommitService();
- }
-
- initService(commitService);
- }
-
- @Override
- protected void doStart() throws Exception {
- lock.lock();
- try {
- super.doStart();
-
- // ensure we start from clean
- commitHashes.clear();
- lastSha = null;
-
- if (startingSha.equals("last")) {
- LOG.info("Indexing current commits on: {}/{}@{}", getEndpoint().getRepoOwner(), getEndpoint().getRepoName(),
- branchName);
- List<RepositoryCommit> commits = commitService.getCommits(getRepository(), branchName, null);
- if (!commits.isEmpty()) {
- lastSha = commits.get(0).getSha();
- }
- LOG.info("Starting from last sha: {}", lastSha);
- } else if (!startingSha.equals("beginning")) {
- lastSha = startingSha;
- LOG.info("Starting from sha: {}", lastSha);
- } else {
- LOG.info("Starting from beginning");
- }
- started = true;
- } finally {
- lock.unlock();
- }
- }
-
- @Override
- protected void doStop() throws Exception {
- lock.lock();
- try {
- super.doStop();
-
- commitHashes.clear();
- lastSha = null;
- started = false;
- } finally {
- lock.unlock();
- }
- }
-
- @Override
- protected int poll() throws Exception {
- lock.lock();
- try {
- if (!started) {
- return 0;
- }
-
- List<RepositoryCommit> commits = commitService.getCommits(getRepository(), branchName, null);
-
- // clip the list after the last sha
- if (lastSha != null) {
- int pos = -1;
- for (int i = 0; i < commits.size(); i++) {
- RepositoryCommit commit = commits.get(i);
- if (lastSha.equals(commit.getSha())) {
- pos = i;
- break;
- }
- }
- if (pos != -1) {
- commits = commits.subList(0, pos);
- }
- }
-
- // In the end, we want tags oldest to newest.
- ArrayDeque<RepositoryCommit> newCommits = new ArrayDeque<>();
- for (RepositoryCommit commit : commits) {
- String sha = commit.getSha();
- if (!commitHashes.contains(sha)) {
- newCommits.push(commit);
- // make room when adding new elements
- while (commitHashes.size() > CAPACITY - 1) {
- commitHashes.remove();
- }
- commitHashes.add(sha);
- }
- }
-
- Queue<Object> exchanges = new ArrayDeque<>();
- while (!newCommits.isEmpty()) {
- RepositoryCommit newCommit = newCommits.pop();
- Exchange e = createExchange(true);
- if (newCommit.getAuthor() != null) {
- e.getMessage().setHeader(GitHubConstants.GITHUB_COMMIT_AUTHOR, newCommit.getAuthor().getName());
- }
- if (newCommit.getCommitter() != null) {
- e.getMessage().setHeader(GitHubConstants.GITHUB_COMMIT_COMMITTER, newCommit.getCommitter().getName());
- }
- e.getMessage().setHeader(GitHubConstants.GITHUB_COMMIT_SHA, newCommit.getSha());
- e.getMessage().setHeader(GitHubConstants.GITHUB_COMMIT_URL, newCommit.getUrl());
- if (getEndpoint().isCommitMessageAsBody()) {
- e.getMessage().setBody(newCommit.getCommit().getMessage());
- } else {
- e.getMessage().setBody(newCommit);
- }
- exchanges.add(e);
- }
- int counter = processBatch(exchanges);
- LOG.debug("Last sha: {}", lastSha);
- return counter;
- } finally {
- lock.unlock();
- }
- }
-
- @Override
- public int processBatch(Queue<Object> exchanges) throws Exception {
- int total = exchanges.size();
- int answer = total;
- if (this.maxMessagesPerPoll > 0 && total > this.maxMessagesPerPoll) {
- LOG.debug("Limiting to maximum messages to poll {} as there were {} messages in this poll.",
- this.maxMessagesPerPoll, total);
- total = this.maxMessagesPerPoll;
- }
-
- for (int index = 0; index < total && this.isBatchAllowed(); ++index) {
- Exchange exchange = (Exchange) exchanges.poll();
- exchange.setProperty(ExchangePropertyKey.BATCH_INDEX, index);
- exchange.setProperty(ExchangePropertyKey.BATCH_SIZE, total);
- exchange.setProperty(ExchangePropertyKey.BATCH_COMPLETE, index == total - 1);
- this.pendingExchanges = total - index - 1;
- this.lastSha = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_SHA, String.class);
- getProcessor().process(exchange);
- }
-
- return answer;
- }
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/EventsConsumer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/EventsConsumer.java
deleted file mode 100644
index 66a2f7e557f9..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/EventsConsumer.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Queue;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.component.github.event.GitHubEventFetchStrategy;
-import org.apache.camel.spi.Registry;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.client.PageIterator;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.service.EventService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class EventsConsumer extends AbstractGitHubConsumer {
-
- private static final Logger LOG = LoggerFactory.getLogger(EventsConsumer.class);
-
- private final EventService eventService;
- private final GitHubEventFetchStrategy eventFetchStrategy;
- private long lastEventId;
-
- public EventsConsumer(GitHubEndpoint endpoint, Processor processor) throws Exception {
- super(endpoint, processor);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- EventService service = registry.lookupByNameAndType(GitHubConstants.GITHUB_EVENT_SERVICE, EventService.class);
- if (service != null) {
- eventService = service;
- } else {
- eventService = new EventService();
- }
-
- initService(eventService);
-
- GitHubEventFetchStrategy strategy = endpoint.getEventFetchStrategy();
- if (strategy != null) {
- eventFetchStrategy = strategy;
- } else {
- eventFetchStrategy = new DefaultGitHubEventFetchStrategy(getRepository());
- }
- }
-
- @Override
- protected int poll() throws Exception {
- List<Event> newEvents = new ArrayList<>();
- PageIterator<Event> iterator = eventFetchStrategy.fetchEvents(eventService);
-
- while (iterator.hasNext()) {
- Collection<Event> events = iterator.next();
- for (Event event : events) {
- if (Long.parseLong(event.getId()) > lastEventId) {
- newEvents.add(event);
- }
- }
- }
-
- Queue<Object> exchanges = new ArrayDeque<>();
- if (!newEvents.isEmpty()) {
- newEvents.sort((e1, e2) -> Long.valueOf(e1.getId()).compareTo(Long.parseLong(e2.getId())));
- Event latestEvent = newEvents.get(newEvents.size() - 1);
- lastEventId = Long.parseLong(latestEvent.getId());
-
- for (Event event : newEvents) {
- Exchange e = createExchange(true);
- e.getMessage().setBody(event.getType());
- e.getMessage().setHeader(GitHubConstants.GITHUB_EVENT_PAYLOAD, event.getPayload());
- exchanges.add(e);
- }
- }
- return processBatch(exchanges);
- }
-
- /**
- * Default {@link GitHubEventFetchStrategy} to fetch events for the GitHub repository configured on the endpoint.
- */
- private static final class DefaultGitHubEventFetchStrategy implements GitHubEventFetchStrategy {
- private final Repository repository;
-
- private DefaultGitHubEventFetchStrategy(Repository repository) {
- this.repository = repository;
- }
-
- @Override
- public PageIterator<Event> fetchEvents(EventService eventService) {
- return eventService.pageEvents(repository);
- }
- }
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/PullRequestCommentConsumer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/PullRequestCommentConsumer.java
deleted file mode 100644
index b0c888c092cf..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/PullRequestCommentConsumer.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.service.IssueService;
-import org.eclipse.egit.github.core.service.PullRequestService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PullRequestCommentConsumer extends AbstractGitHubConsumer {
- private static final transient Logger LOG = LoggerFactory.getLogger(PullRequestCommentConsumer.class);
-
- private PullRequestService pullRequestService;
-
- private IssueService issueService;
-
- private List<Long> commentIds = new ArrayList<>();
-
- public PullRequestCommentConsumer(GitHubEndpoint endpoint, Processor processor) throws Exception {
- super(endpoint, processor);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_PULL_REQUEST_SERVICE);
- if (service != null) {
- LOG.debug("Using PullRequestService found in registry {}", service.getClass().getCanonicalName());
- pullRequestService = (PullRequestService) service;
- } else {
- pullRequestService = new PullRequestService();
- }
- initService(pullRequestService);
-
- service = registry.lookupByName(GitHubConstants.GITHUB_ISSUE_SERVICE);
- if (service != null) {
- issueService = (IssueService) service;
- } else {
- issueService = new IssueService();
- }
- initService(issueService);
-
- LOG.info("GitHub PullRequestCommentConsumer: Indexing current pull request comments...");
- List<PullRequest> pullRequests = pullRequestService.getPullRequests(getRepository(), "open");
- for (PullRequest pullRequest : pullRequests) {
- List<CommitComment> commitComments = pullRequestService.getComments(getRepository(),
- pullRequest.getNumber());
- for (Comment comment : commitComments) {
- commentIds.add(comment.getId());
- }
- List<Comment> comments = issueService.getComments(getRepository(), pullRequest.getNumber());
- for (Comment comment : comments) {
- commentIds.add(comment.getId());
- }
- }
- }
-
- @Override
- protected int poll() throws Exception {
- // Do this here, rather than at the class level. We only care about it for setting the Exchange header, so
- // there's no point growing memory over time.
- Map<Long, PullRequest> commentIdToPullRequest = new HashMap<>();
-
- List<PullRequest> pullRequests = pullRequestService.getPullRequests(getRepository(), "open");
- // In the end, we want comments oldest to newest.
- ArrayDeque<Comment> newComments = new ArrayDeque<>();
- for (PullRequest pullRequest : pullRequests) {
- List<CommitComment> commitComments = pullRequestService.getComments(getRepository(), pullRequest.getNumber());
- for (Comment comment : commitComments) {
- if (!commentIds.contains(comment.getId())) {
- newComments.add(comment);
- commentIds.add(comment.getId());
- commentIdToPullRequest.put(comment.getId(), pullRequest);
- }
- }
- List<Comment> comments = issueService.getComments(getRepository(), pullRequest.getNumber());
- for (Comment comment : comments) {
- if (!commentIds.contains(comment.getId())) {
- newComments.add(comment);
- commentIds.add(comment.getId());
- commentIdToPullRequest.put(comment.getId(), pullRequest);
- }
- }
- }
-
- Queue<Object> exchanges = new ArrayDeque<>();
- while (!newComments.isEmpty()) {
- Comment newComment = newComments.pop();
- Exchange e = createExchange(true);
- e.getIn().setBody(newComment);
-
- // Required by the producers. Set it here for convenience.
- e.getIn().setHeader(GitHubConstants.GITHUB_PULLREQUEST, commentIdToPullRequest.get(newComment.getId()));
- exchanges.add(e);
- }
- return processBatch(exchanges);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/PullRequestConsumer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/PullRequestConsumer.java
deleted file mode 100644
index 965a88ee4369..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/PullRequestConsumer.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.ArrayDeque;
-import java.util.List;
-import java.util.Queue;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.service.PullRequestService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PullRequestConsumer extends AbstractGitHubConsumer {
- private static final transient Logger LOG = LoggerFactory.getLogger(PullRequestConsumer.class);
-
- private PullRequestService pullRequestService;
-
- private int lastOpenPullRequest;
-
- public PullRequestConsumer(GitHubEndpoint endpoint, Processor processor) throws Exception {
- super(endpoint, processor);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_PULL_REQUEST_SERVICE);
- if (service != null) {
- LOG.debug("Using PullRequestService found in registry {}", service.getClass().getCanonicalName());
- pullRequestService = (PullRequestService) service;
- } else {
- pullRequestService = new PullRequestService();
- }
-
- initService(pullRequestService);
-
- LOG.info("GitHub PullRequestConsumer: Indexing current pull requests...");
- List<PullRequest> pullRequests = pullRequestService.getPullRequests(getRepository(), "open");
- if (!pullRequests.isEmpty()) {
- lastOpenPullRequest = pullRequests.get(0).getNumber();
- }
- }
-
- @Override
- protected int poll() throws Exception {
- List<PullRequest> openPullRequests = pullRequestService.getPullRequests(getRepository(), "open");
- // In the end, we want PRs oldest to newest.
- ArrayDeque<PullRequest> newPullRequests = new ArrayDeque<>();
- for (PullRequest pullRequest : openPullRequests) {
- if (pullRequest.getNumber() > lastOpenPullRequest) {
- newPullRequests.push(pullRequest);
- } else {
- break;
- }
- }
-
- if (!newPullRequests.isEmpty()) {
- lastOpenPullRequest = openPullRequests.get(0).getNumber();
- }
-
- Queue<Object> exchanges = new ArrayDeque<>();
- while (!newPullRequests.isEmpty()) {
- PullRequest newPullRequest = newPullRequests.pop();
- Exchange e = createExchange(true);
-
- e.getIn().setBody(newPullRequest);
-
- // Required by the producers. Set it here for convenience.
- e.getIn().setHeader(GitHubConstants.GITHUB_PULLREQUEST, newPullRequest.getNumber());
- if (newPullRequest.getHead() != null) {
- e.getIn().setHeader(GitHubConstants.GITHUB_PULLREQUEST_HEAD_COMMIT_SHA, newPullRequest.getHead().getSha());
- }
- exchanges.add(e);
- }
- return processBatch(exchanges);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/TagConsumer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/TagConsumer.java
deleted file mode 100644
index 98429a49c2b4..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/consumer/TagConsumer.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Queue;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.eclipse.egit.github.core.RepositoryTag;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class TagConsumer extends AbstractGitHubConsumer {
-
- private static final Logger LOG = LoggerFactory.getLogger(TagConsumer.class);
-
- private final List<String> tagNames = new ArrayList<>();
-
- public TagConsumer(GitHubEndpoint endpoint, Processor processor) throws Exception {
- super(endpoint, processor);
-
- LOG.info("GitHub TagConsumer: Indexing current tags...");
- List<RepositoryTag> tags = getRepositoryService().getTags(getRepository());
- for (RepositoryTag tag : tags) {
- tagNames.add(tag.getName());
- }
- }
-
- @Override
- protected int poll() throws Exception {
- List<RepositoryTag> tags = getRepositoryService().getTags(getRepository());
- // In the end, we want tags oldest to newest.
- ArrayDeque<RepositoryTag> newTags = new ArrayDeque<>();
- for (RepositoryTag tag : tags) {
- if (!tagNames.contains(tag.getName())) {
- newTags.push(tag);
- tagNames.add(tag.getName());
- }
- }
-
- Queue<Object> exchanges = new ArrayDeque<>();
- while (!newTags.isEmpty()) {
- RepositoryTag newTag = newTags.pop();
- Exchange e = createExchange(true);
- e.getIn().setBody(newTag);
- exchanges.add(e);
- }
- return processBatch(exchanges);
- }
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/event/GitHubEventFetchStrategy.java b/components/camel-github/src/main/java/org/apache/camel/component/github/event/GitHubEventFetchStrategy.java
deleted file mode 100644
index 6208678a8aec..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/event/GitHubEventFetchStrategy.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.event;
-
-import org.eclipse.egit.github.core.client.PageIterator;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.service.EventService;
-
-/**
- * An abstraction that allows customization of how the {@link org.apache.camel.component.github.consumer.EventsConsumer}
- * fetches GitHub events.
- *
- * The default strategy is to fetch events for the repository that was configured on the consumer.
- */
-public interface GitHubEventFetchStrategy {
-
- /**
- * Fetches GitHub events from the {@link EventService}.
- *
- * @param eventService The {@link EventService} for interacting with the GitHub event APIs
- * @return {@link PageIterator} of event objects
- */
- PageIterator<Event> fetchEvents(EventService eventService);
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/AbstractGitHubProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/AbstractGitHubProducer.java
deleted file mode 100644
index c05e4c995726..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/AbstractGitHubProducer.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.support.DefaultProducer;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.service.GitHubService;
-import org.eclipse.egit.github.core.service.RepositoryService;
-
-public abstract class AbstractGitHubProducer extends DefaultProducer {
-
- private final GitHubEndpoint endpoint;
-
- private RepositoryService repositoryService;
-
- private Repository repository;
-
- protected AbstractGitHubProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
- this.endpoint = endpoint;
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_REPOSITORY_SERVICE);
- if (service != null) {
- repositoryService = (RepositoryService) service;
- } else {
- repositoryService = new RepositoryService();
- }
- initService(repositoryService);
- repository = repositoryService.getRepository(endpoint.getRepoOwner(), endpoint.getRepoName());
- }
-
- protected void initService(GitHubService service) {
- service.getClient().setOAuth2Token(endpoint.getOauthToken());
- }
-
- protected RepositoryService getRepositoryService() {
- return repositoryService;
- }
-
- protected Repository getRepository() {
- return repository;
- }
-
- @Override
- public abstract void process(Exchange exchange) throws Exception;
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/ClosePullRequestProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/ClosePullRequestProducer.java
deleted file mode 100644
index 62bfe4f0cec4..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/ClosePullRequestProducer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.Calendar;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.support.ExchangeHelper;
-import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.service.PullRequestService;
-
-/**
- * Producer endpoint that closes a pull request. The endpoint requires the "GitHubPullRequest" header, identifying the
- * pull request number (integer).
- */
-public class ClosePullRequestProducer extends AbstractGitHubProducer {
-
- private PullRequestService pullRequestService;
-
- public ClosePullRequestProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_PULL_REQUEST_SERVICE);
- if (service != null) {
- pullRequestService = (PullRequestService) service;
- } else {
- pullRequestService = new PullRequestService();
- }
- initService(pullRequestService);
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- Integer pullRequestNumber = exchange.getIn().getHeader(GitHubConstants.GITHUB_PULLREQUEST, Integer.class);
- PullRequest pullRequest = pullRequestService.getPullRequest(getRepository(), pullRequestNumber);
- pullRequest.setState("closed");
- pullRequest.setClosedAt(Calendar.getInstance().getTime());
- pullRequest = pullRequestService.editPullRequest(getRepository(), pullRequest);
-
- // support InOut
- ExchangeHelper.setOutBodyPatternAware(exchange, pullRequest);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/CreateIssueProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/CreateIssueProducer.java
deleted file mode 100644
index 65da3ecc79da..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/CreateIssueProducer.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.util.ObjectHelper;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.service.IssueService;
-
-/**
- * Producer endpoint that creates an issue. The endpoint requires the "GitHubIssueTitle" header, which sets the GitHub
- * issue title. The issue body content is set from the exchange message body.
- */
-public class CreateIssueProducer extends AbstractGitHubProducer {
-
- private IssueService issueService;
-
- public CreateIssueProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_ISSUE_SERVICE);
- if (service != null) {
- issueService = (IssueService) service;
- } else {
- issueService = new IssueService();
- }
- initService(issueService);
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- Issue issue = new Issue();
- String issueTitle = exchange.getIn().getHeader(GitHubConstants.GITHUB_ISSUE_TITLE, String.class);
- if (ObjectHelper.isEmpty(issueTitle)) {
- throw new IllegalArgumentException("Issue Title must be specified to create an issue");
- }
- issue.setTitle(issueTitle);
- issue.setBody(exchange.getIn().getBody(String.class));
-
- Issue finalIssue = issueService.createIssue(getRepository(), issue);
-
- // copy the header of in message to the out message
- exchange.getOut().copyFrom(exchange.getIn());
- exchange.getOut().setBody(finalIssue);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/GetCommitFileProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/GetCommitFileProducer.java
deleted file mode 100644
index d46684ec6033..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/GetCommitFileProducer.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.apache.commons.codec.binary.Base64;
-import org.eclipse.egit.github.core.Blob;
-import org.eclipse.egit.github.core.CommitFile;
-import org.eclipse.egit.github.core.service.DataService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Producer endpoint that gets the file associated with a CommitFile object.
- *
- */
-public class GetCommitFileProducer extends AbstractGitHubProducer {
- private static final transient Logger LOG = LoggerFactory.getLogger(GetCommitFileProducer.class);
-
- private DataService dataService;
-
- private String encoding = Blob.ENCODING_UTF8;
-
- public GetCommitFileProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_DATA_SERVICE);
- if (service != null) {
- LOG.debug("Using DataService found in registry {}", service.getClass().getCanonicalName());
- dataService = (DataService) service;
- } else {
- dataService = new DataService();
- }
- initService(dataService);
-
- if (endpoint.getEncoding() != null) {
- encoding = endpoint.getEncoding();
-
- if (!encoding.equalsIgnoreCase(Blob.ENCODING_BASE64)
- && !encoding.equalsIgnoreCase(Blob.ENCODING_UTF8)) {
- throw new IllegalArgumentException("Unknown encoding '" + encoding + "'");
- }
- }
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- CommitFile file = exchange.getIn().getBody(CommitFile.class);
-
- Blob response = dataService.getBlob(getRepository(), file.getSha());
-
- String text = response.getContent();
-
- // By default, if blob encoding is base64 then we convert to UTF-8. If
- // base64 encoding is required, then must be explicitly requested
- if (response.getEncoding().equals(Blob.ENCODING_BASE64)
- && encoding != null && encoding.equalsIgnoreCase(Blob.ENCODING_UTF8)) {
- text = new String(Base64.decodeBase64(text));
- }
-
- // copy the header of in message to the out message
- exchange.getOut().copyFrom(exchange.getIn());
- exchange.getOut().setBody(text);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestCommentProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestCommentProducer.java
deleted file mode 100644
index 3f79696f583b..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestCommentProducer.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.apache.camel.support.ExchangeHelper;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.service.IssueService;
-import org.eclipse.egit.github.core.service.PullRequestService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Producer endpoint that adds one of two types of comments on a GitHub pull request:
- *
- * 1.) Response to an in-line comment made on a pull request commit review. To use, include the "GitHubInResponseTo"
- * header, identifying the comment ID (integer) that you're responding to. 2.) General comment on the pull request issue
- * itself.
- *
- * Both endpoints require the "GitHubPullRequest" header, identifying the pull request number (integer).
- */
-public class PullRequestCommentProducer extends AbstractGitHubProducer {
- private static final transient Logger LOG = LoggerFactory.getLogger(PullRequestCommentProducer.class);
- private PullRequestService pullRequestService;
-
- private IssueService issueService;
-
- public PullRequestCommentProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_PULL_REQUEST_SERVICE);
- if (service != null) {
- LOG.debug("Using PullRequestService found in registry {}", service.getClass().getCanonicalName());
- pullRequestService = (PullRequestService) service;
- } else {
- pullRequestService = new PullRequestService();
- }
- initService(pullRequestService);
-
- service = registry.lookupByName("githbIssueService");
- if (service != null) {
- issueService = (IssueService) service;
- } else {
- issueService = new IssueService();
- }
- initService(issueService);
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- Integer pullRequestNumber = exchange.getIn().getHeader(GitHubConstants.GITHUB_PULLREQUEST, Integer.class);
- Integer inResponseTo = exchange.getIn().getHeader(GitHubConstants.GITHUB_INRESPONSETO, Integer.class);
- String text = exchange.getIn().getBody(String.class);
-
- Comment response;
- if (inResponseTo != null && inResponseTo > 0) {
- response = pullRequestService.replyToComment(getRepository(), pullRequestNumber, inResponseTo, text);
- } else {
- // Otherwise, just comment on the pull request itself.
- response = issueService.createComment(getRepository(), pullRequestNumber, text);
- }
-
- // support InOut
- ExchangeHelper.setOutBodyPatternAware(exchange, response);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestFilesProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestFilesProducer.java
deleted file mode 100644
index beb91baa5b16..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestFilesProducer.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.List;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.eclipse.egit.github.core.CommitFile;
-import org.eclipse.egit.github.core.service.PullRequestService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Producer endpoint that gets the files associated with a pull request.
- *
- * The endpoint requires the "GitHubPullRequest" header, identifying the pull request number (integer).
- */
-public class PullRequestFilesProducer extends AbstractGitHubProducer {
- private static final transient Logger LOG = LoggerFactory.getLogger(PullRequestFilesProducer.class);
-
- private PullRequestService pullRequestService;
-
- public PullRequestFilesProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_PULL_REQUEST_SERVICE);
- if (service != null) {
- LOG.debug("Using PullRequestService found in registry {}", service.getClass().getCanonicalName());
- pullRequestService = (PullRequestService) service;
- } else {
- pullRequestService = new PullRequestService();
- }
- initService(pullRequestService);
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- Integer pullRequestNumber = exchange.getIn().getHeader(GitHubConstants.GITHUB_PULLREQUEST, Integer.class);
-
- List<CommitFile> response = pullRequestService.getFiles(getRepository(), pullRequestNumber);
-
- // copy the header of in message to the out message
- exchange.getOut().copyFrom(exchange.getIn());
- exchange.getOut().setBody(response);
- }
-
-}
diff --git a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestStateProducer.java b/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestStateProducer.java
deleted file mode 100644
index cea6e99d4ffb..000000000000
--- a/components/camel-github/src/main/java/org/apache/camel/component/github/producer/PullRequestStateProducer.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.component.github.GitHubEndpoint;
-import org.apache.camel.spi.Registry;
-import org.eclipse.egit.github.core.CommitStatus;
-import org.eclipse.egit.github.core.service.CommitService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Producer endpoint that sets the commit status.
- *
- * The endpoint requires the "GitHubPullRequest" header, identifying the pull request number (integer), and the
- * "GitHubPullRequestHeadCommitSHA" header, identifying the commit SHA on which the state will be recorded.
- */
-public class PullRequestStateProducer extends AbstractGitHubProducer {
- private static final transient Logger LOG = LoggerFactory.getLogger(PullRequestStateProducer.class);
-
- private CommitService commitService;
-
- private String state;
- private String targetUrl;
-
- public PullRequestStateProducer(GitHubEndpoint endpoint) throws Exception {
- super(endpoint);
-
- Registry registry = endpoint.getCamelContext().getRegistry();
- Object service = registry.lookupByName(GitHubConstants.GITHUB_COMMIT_SERVICE);
- if (service != null) {
- LOG.debug("Using CommitService found in registry {}", service.getClass().getCanonicalName());
- commitService = (CommitService) service;
- } else {
- commitService = new CommitService();
- }
- initService(commitService);
-
- state = endpoint.getState();
- targetUrl = endpoint.getTargetUrl();
- }
-
- @Override
- public void process(Exchange exchange) throws Exception {
- String pullRequestNumberSHA
- = exchange.getIn().getHeader(GitHubConstants.GITHUB_PULLREQUEST_HEAD_COMMIT_SHA, String.class);
- String text = exchange.getIn().getBody(String.class);
-
- CommitStatus status = new CommitStatus();
-
- if (state != null) {
- status.setState(state);
- }
-
- if (targetUrl != null) {
- status.setTargetUrl(targetUrl);
- }
-
- if (text != null) {
- status.setDescription(text);
- }
-
- CommitStatus response = commitService.createStatus(getRepository(), pullRequestNumberSHA, status);
-
- // copy the header of in message to the out message
- exchange.getOut().copyFrom(exchange.getIn());
- exchange.getOut().setBody(response);
- }
-
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/GitHubComponentTestBase.java b/components/camel-github/src/test/java/org/apache/camel/component/github/GitHubComponentTestBase.java
deleted file mode 100644
index 92cd0964d0ba..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/GitHubComponentTestBase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.CamelContext;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.component.github.services.MockCommitService;
-import org.apache.camel.component.github.services.MockEventService;
-import org.apache.camel.component.github.services.MockIssueService;
-import org.apache.camel.component.github.services.MockPullRequestService;
-import org.apache.camel.component.github.services.MockRepositoryService;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit6.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class GitHubComponentTestBase extends CamelTestSupport {
-
- protected final Logger log = LoggerFactory.getLogger(getClass());
-
- @BindToRegistry(GitHubConstants.GITHUB_COMMIT_SERVICE)
- protected MockCommitService commitService = new MockCommitService();
- @BindToRegistry(GitHubConstants.GITHUB_REPOSITORY_SERVICE)
- protected MockRepositoryService repositoryService = new MockRepositoryService();
- @BindToRegistry(GitHubConstants.GITHUB_PULL_REQUEST_SERVICE)
- protected MockPullRequestService pullRequestService = new MockPullRequestService();
- @BindToRegistry(GitHubConstants.GITHUB_ISSUE_SERVICE)
- protected MockIssueService issueService = new MockIssueService(pullRequestService);
- @BindToRegistry(GitHubConstants.GITHUB_EVENT_SERVICE)
- protected MockEventService eventService = new MockEventService();
-
- @EndpointInject("mock:result")
- protected MockEndpoint mockResultEndpoint;
-
- @Override
- protected CamelContext createCamelContext() throws Exception {
- CamelContext context = super.createCamelContext();
- GitHubComponent ghc = context.getComponent("github", GitHubComponent.class);
- ghc.setOauthToken("mytoken");
- return context;
- }
-
- @Test
- public void emptyAtStartupTest() throws Exception {
- mockResultEndpoint.expectedMessageCount(0);
- mockResultEndpoint.assertIsSatisfied();
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerBeginningTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerBeginningTest.java
deleted file mode 100644
index 38c8b0934326..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerBeginningTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.junit.jupiter.api.Test;
-
-public class CommitConsumerBeginningTest extends GitHubComponentTestBase {
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://commit/master?startingSha=beginning&repoOwner=anotherguy&repoName=somerepo")
- .routeId("foo").noAutoStartup()
- .process(new GitHubCommitProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void commitConsumerTest() throws Exception {
- // add 2 commits before starting route
- commitService.addRepositoryCommit("test-1");
- commitService.addRepositoryCommit("test-2");
-
- mockResultEndpoint.expectedMessageCount(5);
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder("test-1", "test-2", "test-3", "test-4", "test-5");
-
- context.getRouteController().startAllRoutes();
-
- commitService.addRepositoryCommit("test-3");
- commitService.addRepositoryCommit("test-4");
- commitService.addRepositoryCommit("test-5");
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class GitHubCommitProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- String author = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_AUTHOR, String.class);
- String sha = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_SHA, String.class);
- if (log.isDebugEnabled()) {
- log.debug("Got commit with author: {}: SHA {}", author, sha);
- }
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerLastTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerLastTest.java
deleted file mode 100644
index b3c77bda78fb..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerLastTest.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.apache.camel.support.DefaultScheduledPollConsumerScheduler;
-import org.junit.jupiter.api.Test;
-
-public class CommitConsumerLastTest extends GitHubComponentTestBase {
-
- @BindToRegistry("myScheduler")
- private final MyScheduler scheduler = createScheduler();
-
- private MyScheduler createScheduler() {
- MyScheduler scheduler = new MyScheduler();
- scheduler.setDelay(100);
- scheduler.setInitialDelay(0);
- return scheduler;
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://commit/master?startingSha=last&repoOwner=anotherguy&repoName=somerepo&scheduler=#myScheduler")
- .routeId("foo").noAutoStartup()
- .process(new GitHubCommitProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void commitConsumerLongHistoryLastShaTest() throws Exception {
- for (int i = 0; i < 2000; i++) {
- commitService.addRepositoryCommit("existing commit " + i);
- }
-
- mockResultEndpoint.setAssertPeriod(500);
- mockResultEndpoint.expectedBodiesReceived("new commit 1", "new commit 2");
-
- context.getRouteController().startAllRoutes();
-
- commitService.addRepositoryCommit("new commit 1");
- commitService.addRepositoryCommit("new commit 2");
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class GitHubCommitProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- String author = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_AUTHOR, String.class);
- String sha = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_SHA, String.class);
- if (log.isDebugEnabled()) {
- log.debug("Commit SHA: {}", sha);
- log.debug("Got commit with author: {}: SHA {}", author, sha);
- }
- }
- }
-
- private static final class MyScheduler extends DefaultScheduledPollConsumerScheduler {
-
- @Override
- public void startScheduler() {
- super.startScheduler();
- try {
- /*
- adding a delay to the CommitConsumer.doStart() method to force the CommitConsumer.poll()
- method to be called before the CommitConsumer.doStart() finishes which could leave the
- lastSha variable null
- */
- Thread.sleep(200);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
- }
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerRawTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerRawTest.java
deleted file mode 100644
index 9c456c73fc52..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerRawTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.junit.jupiter.api.Test;
-
-public class CommitConsumerRawTest extends GitHubComponentTestBase {
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://commit/master?commitMessageAsBody=false&repoOwner=anotherguy&repoName=somerepo")
- .process(new GitHubCommitProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void commitConsumerTest() throws Exception {
- mockResultEndpoint.expectedMessageCount(2);
- RepositoryCommit commit1 = commitService.addRepositoryCommit("test-1");
- RepositoryCommit commit2 = commitService.addRepositoryCommit("test-2");
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder(commit1, commit2);
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class GitHubCommitProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- String author = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_AUTHOR, String.class);
- String sha = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_SHA, String.class);
- if (log.isDebugEnabled()) {
- log.debug("Got commit with author: {}: SHA {}", author, sha);
- }
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerSkipExistingOnStartupTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerSkipExistingOnStartupTest.java
deleted file mode 100644
index 75cdaed407d6..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerSkipExistingOnStartupTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.junit.jupiter.api.Test;
-
-public class CommitConsumerSkipExistingOnStartupTest extends GitHubComponentTestBase {
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://commit/master?repoOwner=anotherguy&repoName=somerepo")
- .routeId("foo").noAutoStartup()
- .process(new GitHubCommitProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void commitConsumerTest() throws Exception {
- // add 2 commits before starting route
- commitService.addRepositoryCommit("test-1");
- commitService.addRepositoryCommit("test-2");
-
- mockResultEndpoint.expectedMessageCount(3);
- mockResultEndpoint.expectedBodiesReceived("test-3", "test-4", "test-5");
-
- context.getRouteController().startAllRoutes();
-
- commitService.addRepositoryCommit("test-3");
- commitService.addRepositoryCommit("test-4");
- commitService.addRepositoryCommit("test-5");
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class GitHubCommitProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- String author = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_AUTHOR, String.class);
- String sha = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_SHA, String.class);
- if (log.isDebugEnabled()) {
- log.debug("Got commit with author: {}: SHA {}", author, sha);
- }
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerTest.java
deleted file mode 100644
index e724b26fcabd..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/CommitConsumerTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.junit.jupiter.api.Test;
-
-public class CommitConsumerTest extends GitHubComponentTestBase {
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://commit/master?repoOwner=anotherguy&repoName=somerepo")
- .process(new GitHubCommitProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void commitConsumerTest() throws Exception {
- mockResultEndpoint.expectedMessageCount(2);
- RepositoryCommit commit1 = commitService.addRepositoryCommit("test-1");
- RepositoryCommit commit2 = commitService.addRepositoryCommit("test-2");
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder(commit1.getCommit().getMessage(), commit2.getCommit().getMessage());
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class GitHubCommitProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- String author = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_AUTHOR, String.class);
- String sha = exchange.getMessage().getHeader(GitHubConstants.GITHUB_COMMIT_SHA, String.class);
- if (log.isDebugEnabled()) {
- log.debug("Got commit with author: {}: SHA {}", author, sha);
- }
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/EventConsumerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/EventConsumerTest.java
deleted file mode 100644
index 822df5a90507..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/EventConsumerTest.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.IssueCommentPayload;
-import org.eclipse.egit.github.core.event.PushPayload;
-import org.eclipse.egit.github.core.event.WatchPayload;
-import org.junit.jupiter.api.Test;
-
-public class EventConsumerTest extends GitHubComponentTestBase {
-
- @Test
- public void getEvents() throws Exception {
- Event watchEvent = new Event();
- watchEvent.setId("1");
- watchEvent.setPayload(new WatchPayload());
- watchEvent.setType("watchEvent");
- eventService.addEvent(watchEvent);
-
- Event pushEvent = new Event();
- pushEvent.setId("2");
- pushEvent.setPayload(new PushPayload());
- pushEvent.setType("pushEvent");
- eventService.addEvent(pushEvent);
-
- Event issueCommentEvent = new Event();
- issueCommentEvent.setId("3");
- issueCommentEvent.setPayload(new IssueCommentPayload());
- issueCommentEvent.setType("issueCommentEvent");
- eventService.addEvent(issueCommentEvent);
-
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder("watchEvent", "pushEvent", "issueCommentEvent");
- mockResultEndpoint.assertIsSatisfied(5000);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("github:event?repoOwner=anotherguy&repoName=somerepo")
- .to(mockResultEndpoint);
- }
- };
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/EventConsumerWithStrategyTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/EventConsumerWithStrategyTest.java
deleted file mode 100644
index 8c1404735655..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/EventConsumerWithStrategyTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.event.GitHubEventFetchStrategy;
-import org.eclipse.egit.github.core.client.PageIterator;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.event.IssueCommentPayload;
-import org.eclipse.egit.github.core.event.PushPayload;
-import org.eclipse.egit.github.core.event.WatchPayload;
-import org.eclipse.egit.github.core.service.EventService;
-import org.junit.jupiter.api.Test;
-
-public class EventConsumerWithStrategyTest extends GitHubComponentTestBase {
-
- private CountDownLatch latch = new CountDownLatch(1);
-
- @BindToRegistry("strategy")
- private GitHubEventFetchStrategy strategy = new GitHubEventFetchStrategy() {
- @Override
- public PageIterator<Event> fetchEvents(EventService eventService) {
- latch.countDown();
- return eventService.pageUserEvents("someguy");
- }
- };
-
- @Test
- public void customFetchStrategy() throws Exception {
- Event watchEvent = new Event();
- watchEvent.setId("1");
- watchEvent.setPayload(new WatchPayload());
- watchEvent.setType("watchEvent");
- eventService.addEvent(watchEvent);
-
- Event pushEvent = new Event();
- pushEvent.setId("2");
- pushEvent.setPayload(new PushPayload());
- pushEvent.setType("pushEvent");
- eventService.addEvent(pushEvent);
-
- Event issueCommentEvent = new Event();
- issueCommentEvent.setId("3");
- issueCommentEvent.setPayload(new IssueCommentPayload());
- issueCommentEvent.setType("issueCommentEvent");
- eventService.addEvent(issueCommentEvent);
-
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder("watchEvent", "pushEvent", "issueCommentEvent");
-
- latch.await(5, TimeUnit.SECONDS);
-
- mockResultEndpoint.assertIsSatisfied(5000);
- }
-
- @Override
- protected RoutesBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("github:event?repoOwner=anotherguy&repoName=somerepo&eventFetchStrategy=#strategy")
- .to(mockResultEndpoint);
- }
- };
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/PullRequestCommentConsumerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/PullRequestCommentConsumerTest.java
deleted file mode 100644
index 051435192ac5..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/PullRequestCommentConsumerTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.PullRequest;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PullRequestCommentConsumerTest extends GitHubComponentTestBase {
- protected static final Logger LOG = LoggerFactory.getLogger(PullRequestCommentConsumerTest.class);
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://pullRequestComment?repoOwner=anotherguy&repoName=somerepo")
- .process(new PullRequestCommentProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void pullRequestCommentTest() throws Exception {
- PullRequest pr1 = pullRequestService.addPullRequest("First add");
- PullRequest pr2 = pullRequestService.addPullRequest("Second");
- CommitComment commitComment1 = pullRequestService.addComment(pr1.getId(), "First comment");
- CommitComment commitComment2 = pullRequestService.addComment(pr2.getId(), "Second comment");
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder(commitComment1, commitComment2);
-
- Thread.sleep(1 * 1000); // TODO do I need this?
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class PullRequestCommentProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- Comment comment = (Comment) in.getBody();
- LOG.debug("Got Comment {} [{}] from User [{}]", comment.getId(), comment.getBody(), comment.getUser().getLogin());
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/PullRequestConsumerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/PullRequestConsumerTest.java
deleted file mode 100644
index 244a870c1ae0..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/PullRequestConsumerTest.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.User;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class PullRequestConsumerTest extends GitHubComponentTestBase {
- protected static final Logger LOG = LoggerFactory.getLogger(PullRequestConsumerTest.class);
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://pullRequest?repoOwner=anotherguy&repoName=somerepo")
- .process(new MockPullRequestProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void pullRequestTest() throws Exception {
- PullRequest pr1 = pullRequestService.addPullRequest("First add");
- PullRequest pr2 = pullRequestService.addPullRequest("Second");
- mockResultEndpoint.expectedMessageCount(2);
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder(pr1, pr2);
- Thread.sleep(1 * 1000);
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class MockPullRequestProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- PullRequest pullRequest = (PullRequest) in.getBody();
- User pullRequestUser = pullRequest.getUser();
-
- pullRequest.getTitle();
- pullRequest.getHtmlUrl();
- pullRequest.getUser().getLogin();
- pullRequest.getUser().getHtmlUrl();
- LOG.debug("Got PullRequest {} [{}] From {}", pullRequest.getHtmlUrl(), pullRequest.getTitle(),
- pullRequestUser.getLogin());
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/SchedulerConfigurationConsumerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/SchedulerConfigurationConsumerTest.java
deleted file mode 100644
index 4426e6986bd8..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/SchedulerConfigurationConsumerTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.EndpointInject;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.jupiter.api.Test;
-
-public class SchedulerConfigurationConsumerTest extends GitHubComponentTestBase {
-
- @EndpointInject("mock:commits")
- protected MockEndpoint mockCommitsEndpoint;
-
- @Test
- public void testSimpleSchedulerConsumerConfiguration() throws InterruptedException {
- mockCommitsEndpoint.expectedMessageCount(5);
- mockCommitsEndpoint.assertIsSatisfied(10000);
- }
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
- @Override
- public void configure() {
- from("github://commit/master?repoOwner=anotherguy&repoName=somerepo&repeatCount=5&sendEmptyMessageWhenIdle=true&delay=1")
- .to(mockCommitsEndpoint);
- }
- };
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/TagConsumerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/TagConsumerTest.java
deleted file mode 100644
index 93a9df2d3fd9..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/consumer/TagConsumerTest.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.consumer;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.eclipse.egit.github.core.RepositoryTag;
-import org.junit.jupiter.api.Test;
-
-public class TagConsumerTest extends GitHubComponentTestBase {
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("github://tag?repoOwner=anotherguy&repoName=somerepo")
- .process(new RepositoryTagProcessor())
- .to(mockResultEndpoint);
- }
- };
- }
-
- @Test
- public void tagConsumerTest() throws Exception {
- RepositoryTag tag1 = repositoryService.addTag("TAG1");
- RepositoryTag tag2 = repositoryService.addTag("TAG2");
- RepositoryTag tag3 = repositoryService.addTag("TAG3");
- mockResultEndpoint.expectedBodiesReceivedInAnyOrder(tag1, tag2, tag3);
- Thread.sleep(1 * 1000);
-
- mockResultEndpoint.assertIsSatisfied();
- }
-
- public class RepositoryTagProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- RepositoryTag tag = (RepositoryTag) in.getBody();
- log.debug("Got TAG [{}]", tag.getName());
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/ClosePullRequestProducerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/producer/ClosePullRequestProducerTest.java
deleted file mode 100644
index ed79331ac099..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/ClosePullRequestProducerTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.PullRequest;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class ClosePullRequestProducerTest extends GitHubComponentTestBase {
- public static final String PULL_REQUEST_PRODUCER_ENDPOINT = "direct:validPullRequest";
- protected static final Logger LOG = LoggerFactory.getLogger(ClosePullRequestProducerTest.class);
- private long latestPullRequestId;
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from(PULL_REQUEST_PRODUCER_ENDPOINT)
- .process(new ClosePullRequestProducerProcessor())
- .to("github://closePullRequest?repoOwner=anotherguy&repoName=somerepo");
- } // end of configure
-
- };
- }
-
- @Test
- public void testPullRequestCommentProducer() throws Exception {
- // Create a pull request
- PullRequest pullRequest = pullRequestService.addPullRequest("testPullRequestCommentProducer");
- latestPullRequestId = pullRequest.getId();
-
- // Close it
- Endpoint closePullRequestEndpoint = getMandatoryEndpoint(PULL_REQUEST_PRODUCER_ENDPOINT);
- Exchange exchange = closePullRequestEndpoint.createExchange();
- template.send(closePullRequestEndpoint, exchange);
-
- Thread.sleep(1 * 1000);
-
- // Verify that it was closed
-
- List<PullRequest> closedPullRequests = pullRequestService.getPullRequests(null, "closed");
- assertNotNull(closedPullRequests);
- boolean found = false;
- for (PullRequest pr : closedPullRequests) {
- if (pr.getId() == latestPullRequestId) {
- found = true;
- break;
- }
- }
-
- assertTrue(found, "Didn't find pull request " + latestPullRequestId);
- }
-
- public class ClosePullRequestProducerProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- Map<String, Object> headers = in.getHeaders();
- headers.put(GitHubConstants.GITHUB_PULLREQUEST, latestPullRequestId);
- }
- }
-
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/CreateIssueProducerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/producer/CreateIssueProducerTest.java
deleted file mode 100644
index 47fe0aae9d4b..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/CreateIssueProducerTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.Repository;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class CreateIssueProducerTest extends GitHubComponentTestBase {
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("direct:createIssue")
- .process(new MockIssueCreateProducerProcessor())
- .to("github://createissue?state=success&repoOwner=anotherguy&repoName=somerepo");
- } // end of configure
-
- };
- }
-
- @Test
- public void testCreateIssue() throws Exception {
- Repository repository = new Repository();
-
- Endpoint issueProducerEndpoint = getMandatoryEndpoint("direct:createIssue");
- Exchange exchange = issueProducerEndpoint.createExchange();
- String issueBody = "There's an error";
- exchange.getIn().setBody(issueBody);
- template.send(issueProducerEndpoint, exchange);
-
- Thread.sleep(1 * 1000);
-
- // Verify that the mock pull request service received this comment.
- Issue issue = issueService.getIssue(repository, 1);
- assertEquals("Error", issue.getTitle());
- assertEquals("There's an error", issue.getBody());
- }
-
- public class MockIssueCreateProducerProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- Map<String, Object> headers = in.getHeaders();
- headers.put(GitHubConstants.GITHUB_ISSUE_TITLE, "Error");
- }
- }
-
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestCommentProducerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestCommentProducerTest.java
deleted file mode 100644
index 28e4c803520f..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestCommentProducerTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.PullRequest;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class PullRequestCommentProducerTest extends GitHubComponentTestBase {
- protected static final Logger LOG = LoggerFactory.getLogger(PullRequestCommentProducerTest.class);
- private long latestPullRequestId;
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("direct:validPullRequest")
- .process(new MockPullRequestCommentProducerProcessor())
- .to("github://pullRequestComment?repoOwner=anotherguy&repoName=somerepo");
- } // end of configure
-
- };
- }
-
- @Test
- public void testPullRequestCommentProducer() throws Exception {
- PullRequest pullRequest = pullRequestService.addPullRequest("testPullRequestCommentProducer");
- latestPullRequestId = pullRequest.getId();
-
- Endpoint commentProducerEndpoint = getMandatoryEndpoint("direct:validPullRequest");
- Exchange exchange = commentProducerEndpoint.createExchange();
- String commentText = "Pushed this comment at " + new Date();
- exchange.getIn().setBody(commentText);
- template.send(commentProducerEndpoint, exchange);
-
- Thread.sleep(1 * 1000);
-
- // Verify that the mock pull request service received this comment.
- List<CommitComment> commitComments = pullRequestService.getComments(null, (int) pullRequest.getId());
- assertEquals(1, commitComments.size());
- CommitComment commitComment = commitComments.get(0);
- assertEquals(Long.toString(pullRequest.getId()), commitComment.getCommitId(), "Commit IDs did not match");
- assertEquals(commentText, commitComment.getBodyText(), "Comment text did not match");
- }
-
- public class MockPullRequestCommentProducerProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- Map<String, Object> headers = in.getHeaders();
- headers.put(GitHubConstants.GITHUB_PULLREQUEST, latestPullRequestId);
- }
- }
-
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestFilesProducerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestFilesProducerTest.java
deleted file mode 100644
index f34a8f3db64a..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestFilesProducerTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.CommitFile;
-import org.eclipse.egit.github.core.PullRequest;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class PullRequestFilesProducerTest extends GitHubComponentTestBase {
- protected static final Logger LOG = LoggerFactory.getLogger(PullRequestFilesProducerTest.class);
- private int latestPullRequestNumber;
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("direct:validPullRequest")
- .process(new MockPullFilesProducerProcessor())
- .to("github://pullRequestFiles?repoOwner=anotherguy&repoName=somerepo");
- } // end of configure
-
- };
- }
-
- @Test
- public void testPullRequestFilesProducer() {
- PullRequest pullRequest = pullRequestService.addPullRequest("testPullRequestFilesProducer");
- latestPullRequestNumber = pullRequest.getNumber();
-
- CommitFile file = new CommitFile();
- file.setFilename("testfile");
-
- List<CommitFile> commitFiles = new ArrayList<>();
- commitFiles.add(file);
- pullRequestService.setFiles(latestPullRequestNumber, commitFiles);
-
- Endpoint filesProducerEndpoint = getMandatoryEndpoint("direct:validPullRequest");
- Exchange exchange = filesProducerEndpoint.createExchange();
-
- Exchange resp = template.send(filesProducerEndpoint, exchange);
-
- assertEquals(resp.getMessage().getBody(), commitFiles);
- }
-
- public class MockPullFilesProducerProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- Map<String, Object> headers = in.getHeaders();
- headers.put(GitHubConstants.GITHUB_PULLREQUEST, latestPullRequestNumber);
- }
- }
-
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestStateProducerTest.java b/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestStateProducerTest.java
deleted file mode 100644
index fe4d625b59ff..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/producer/PullRequestStateProducerTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.producer;
-
-import java.util.Date;
-import java.util.Map;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.github.GitHubComponentTestBase;
-import org.apache.camel.component.github.GitHubConstants;
-import org.eclipse.egit.github.core.CommitStatus;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.fail;
-
-public class PullRequestStateProducerTest extends GitHubComponentTestBase {
- private String commitsha;
-
- @Override
- protected RouteBuilder createRouteBuilder() {
- return new RouteBuilder() {
-
- @Override
- public void configure() {
- from("direct:validPullRequest")
- .process(new MockPullRequestStateProducerProcessor())
- .to("github://pullRequestState?state=success&repoOwner=anotherguy&repoName=somerepo");
- } // end of configure
-
- };
- }
-
- @Test
- public void testPullRequestStateProducer() {
- commitsha = commitService.getNextSha();
-
- Endpoint stateProducerEndpoint = getMandatoryEndpoint("direct:validPullRequest");
- Exchange exchange = stateProducerEndpoint.createExchange();
- String text = "Message sent at " + new Date();
- exchange.getIn().setBody(text);
- Exchange response = template.send(stateProducerEndpoint, exchange);
-
- assertNotNull(response.getMessage().getBody());
-
- if (!(response.getMessage().getBody() instanceof CommitStatus)) {
- fail("Expecting CommitStatus");
- }
-
- CommitStatus status = response.getMessage().getBody(CommitStatus.class);
-
- // Check status set on commit service
- if (commitService.getCommitStatus(commitsha) != status) {
- fail("Commit status sent to service is different from response");
- }
-
- assertEquals("success", status.getState());
-
- assertEquals(status.getDescription(), text);
- }
-
- public class MockPullRequestStateProducerProcessor implements Processor {
- @Override
- public void process(Exchange exchange) {
- Message in = exchange.getIn();
- Map<String, Object> headers = in.getHeaders();
- headers.put(GitHubConstants.GITHUB_PULLREQUEST_HEAD_COMMIT_SHA, commitsha);
- }
- }
-
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockCommitService.java b/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockCommitService.java
deleted file mode 100644
index ee3d33cab4fc..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockCommitService.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.services;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.eclipse.egit.github.core.Commit;
-import org.eclipse.egit.github.core.CommitStatus;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.RepositoryCommit;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.service.CommitService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MockCommitService extends CommitService {
- protected static final Logger LOG = LoggerFactory.getLogger(MockCommitService.class);
-
- private List<RepositoryCommit> commitsList = new ArrayList<>();
- private AtomicLong fakeSha = new AtomicLong(System.currentTimeMillis());
- private Map<String, CommitStatus> commitStatus = new HashMap<>();
-
- public synchronized RepositoryCommit addRepositoryCommit(String message) {
- User author = new User();
- author.setEmail("someguy@gmail.com"); // TODO change
- author.setHtmlUrl("http://github/someguy");
- author.setLogin("someguy");
-
- RepositoryCommit rc = new RepositoryCommit();
- rc.setAuthor(author);
- rc.setSha(fakeSha.incrementAndGet() + "");
- rc.setCommitter(author);
- Commit commit = new Commit();
- if (message == null) {
- commit.setMessage("Test");
- } else {
- commit.setMessage(message);
- }
- rc.setCommit(commit);
- LOG.debug("In MockCommitService added commit with sha {}", rc.getSha());
- commitsList.add(0, rc);
-
- return rc;
- }
-
- @Override
- public synchronized List<RepositoryCommit> getCommits(IRepositoryIdProvider repository, String sha, String path) {
- LOG.debug("Returning list of size {}", commitsList.size());
-
- if (sha != null) {
- for (int i = 0; i < commitsList.size(); i++) {
- RepositoryCommit commit = commitsList.get(i);
- if (commit.getSha().equals(sha)) {
- return commitsList.subList(i, commitsList.size());
- }
- }
- }
- return commitsList;
- }
-
- @Override
- public CommitStatus createStatus(
- IRepositoryIdProvider repository,
- String sha, CommitStatus status) {
- commitStatus.put(sha, status);
-
- return status;
- }
-
- public String getNextSha() {
- return fakeSha.incrementAndGet() + "";
- }
-
- public CommitStatus getCommitStatus(String sha) {
- return commitStatus.get(sha);
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockEventService.java b/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockEventService.java
deleted file mode 100644
index c09044ce8d82..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockEventService.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.services;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.client.GitHubClient;
-import org.eclipse.egit.github.core.client.PageIterator;
-import org.eclipse.egit.github.core.client.PagedRequest;
-import org.eclipse.egit.github.core.event.Event;
-import org.eclipse.egit.github.core.service.EventService;
-
-public class MockEventService extends EventService {
-
- private List<Event> events = new ArrayList<>();
-
- @Override
- public PageIterator<Event> pageEvents(IRepositoryIdProvider repository) {
- return new MockPageIterator(new PagedRequest(), null);
- }
-
- @Override
- public PageIterator<Event> pageUserEvents(String user) {
- return new MockPageIterator(new PagedRequest(), null);
- }
-
- public void addEvent(Event event) {
- events.add(event);
- }
-
- private final class MockPageIterator extends PageIterator {
- private boolean hasNext = true;
-
- public MockPageIterator(PagedRequest request, GitHubClient client) {
- super(request, client);
- }
-
- @Override
- public boolean hasNext() {
- try {
- return hasNext;
- } finally {
- hasNext = false;
- }
- }
-
- @Override
- public Collection next() {
- return events;
- }
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockIssueService.java b/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockIssueService.java
deleted file mode 100644
index b571b46c4556..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockIssueService.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.services;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.egit.github.core.Comment;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Issue;
-import org.eclipse.egit.github.core.service.IssueService;
-
-public class MockIssueService extends IssueService {
-
- private List<Comment> comments = new ArrayList<>();
- private MockPullRequestService mockPullRequestService;
-
- public MockIssueService(MockPullRequestService mockPullRequestService) {
- this.mockPullRequestService = mockPullRequestService;
-
- }
-
- @Override
- public List<Comment> getComments(IRepositoryIdProvider repository, int issueNumber) {
- return comments;
- }
-
- @Override
- public Comment createComment(IRepositoryIdProvider repository, int issueNumber, String commentText) {
- Comment addedComment = mockPullRequestService.addComment((long) issueNumber, commentText);
- return addedComment;
- }
-
- @Override
- public Issue createIssue(IRepositoryIdProvider repository, Issue issue) {
- Issue finalIssue = new Issue();
- issue.setBody("There's an error");
- issue.setTitle("Error");
- issue.setId(1L);
- return finalIssue;
- }
-
- @Override
- public Issue getIssue(IRepositoryIdProvider repository, String issueNumber) {
- Issue issue = new Issue();
- issue.setBody("There's an error");
- issue.setTitle("Error");
- issue.setId(1L);
- return issue;
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockPullRequestService.java b/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockPullRequestService.java
deleted file mode 100644
index 0d0118ae411f..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockPullRequestService.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.services;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.eclipse.egit.github.core.CommitComment;
-import org.eclipse.egit.github.core.CommitFile;
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.PullRequest;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.service.PullRequestService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MockPullRequestService extends PullRequestService {
- protected static final Logger LOG = LoggerFactory.getLogger(MockPullRequestService.class);
-
- private Map<Long, PullRequest> pullRequests = new HashMap<>();
- private List<CommitComment> emptyComments = new ArrayList<>();
- private AtomicInteger pullRequestNumber = new AtomicInteger(101);
- private AtomicInteger commentId = new AtomicInteger(500);
- private Map<Long, List<CommitComment>> allComments = new HashMap<>();
- private Map<Integer, List<CommitFile>> files = new HashMap<>();
-
- @Override
- public List<CommitComment> getComments(IRepositoryIdProvider repository, int pullRequestId) {
- Long id = Long.valueOf(pullRequestId);
- if (allComments.containsKey(id)) {
- List<CommitComment> comments = allComments.get(id);
- return comments;
- } else {
- return emptyComments;
- }
- }
-
- private User createAuthor() {
- User author = new User();
- author.setEmail("someguy@gmail.com");
- author.setHtmlUrl("http://github/someguy");
- author.setLogin("someguy");
-
- return author;
- }
-
- public CommitComment addComment(Long pullRequestId, String bodyText) {
- CommitComment commitComment = new CommitComment();
-
- User author = createAuthor();
- commitComment.setUser(author);
- commitComment.setCommitId(Long.toString(pullRequestId));
- commitComment.setId(commentId.getAndIncrement());
- commitComment.setBody(bodyText);
- commitComment.setBodyText(bodyText);
-
- List<CommitComment> comments;
- if (allComments.containsKey(pullRequestId)) {
- comments = allComments.get(pullRequestId);
- } else {
- comments = new ArrayList<>();
- }
- comments.add(commitComment);
- allComments.put(pullRequestId, comments);
-
- return commitComment;
- }
-
- public PullRequest addPullRequest(String title) {
- User author = createAuthor();
-
- PullRequest pullRequest = new PullRequest();
- pullRequest.setUser(author);
- pullRequest.setHtmlUrl("https://github.com/someguy/somerepo/pull" + pullRequestNumber);
- pullRequest.setTitle(title);
- pullRequest.setNumber(pullRequestNumber.get());
- pullRequest.setId(pullRequestNumber.get());
- pullRequest.setState("open");
- pullRequests.put(pullRequest.getId(), pullRequest);
-
- pullRequestNumber.incrementAndGet();
- return pullRequest;
- }
-
- @Override
- public PullRequest getPullRequest(IRepositoryIdProvider repository, int id) {
- PullRequest pullRequest = pullRequests.get((long) id);
- return pullRequest;
- }
-
- @Override
- public PullRequest editPullRequest(IRepositoryIdProvider repository, PullRequest request) {
- pullRequests.put(request.getId(), request);
- return request;
- }
-
- @Override
- public synchronized List<PullRequest> getPullRequests(IRepositoryIdProvider repository, String state) {
- List<PullRequest> result = new ArrayList<>();
-
- for (PullRequest pr : pullRequests.values()) {
- if (pr.getState().equals(state)) {
- result.add(pr);
- }
- }
-
- LOG.debug("Returning list of {} pull requests with state {}", result.size(), state);
- return result;
- }
-
- public void setFiles(int id, List<CommitFile> commitFiles) {
- files.put(id, commitFiles);
- }
-
- @Override
- public List<CommitFile> getFiles(IRepositoryIdProvider repository, int id) {
- return files.get(id);
- }
-}
diff --git a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockRepositoryService.java b/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockRepositoryService.java
deleted file mode 100644
index 9c18ff8c77bc..000000000000
--- a/components/camel-github/src/test/java/org/apache/camel/component/github/services/MockRepositoryService.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.github.services;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.egit.github.core.IRepositoryIdProvider;
-import org.eclipse.egit.github.core.Repository;
-import org.eclipse.egit.github.core.RepositoryTag;
-import org.eclipse.egit.github.core.User;
-import org.eclipse.egit.github.core.service.RepositoryService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MockRepositoryService extends RepositoryService {
- protected static final Logger LOG = LoggerFactory.getLogger(MockRepositoryService.class);
-
- private List<RepositoryTag> tags = new ArrayList<>();
-
- public RepositoryTag addTag(String tagName) {
- RepositoryTag tag = new RepositoryTag();
- tag.setName(tagName);
- tags.add(tag);
-
- return tag;
- }
-
- @Override
- public Repository getRepository(final String owner, final String name) {
- Repository repository = new Repository();
- User user = new User();
- user.setName(owner);
- user.setLogin(owner);
- repository.setOwner(user);
- repository.setName(name);
- return repository;
- }
-
- @Override
- public List<RepositoryTag> getTags(IRepositoryIdProvider repository) {
- LOG.debug("in MockRepositoryService returning {} tags", tags.size());
- return tags;
- }
-}
diff --git a/components/camel-github/src/test/resources/log4j2.properties b/components/camel-github/src/test/resources/log4j2.properties
deleted file mode 100644
index edee62d123c5..000000000000
--- a/components/camel-github/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-appender.file.type = File
-appender.file.name = file
-appender.file.fileName = target/camel-github-test.log
-appender.file.layout.type = PatternLayout
-appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
-rootLogger.level = INFO
-rootLogger.appenderRef.file.ref = file
diff --git a/components/pom.xml b/components/pom.xml
index 394edb5f1fb3..2df71eed5d5f 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -148,7 +148,6 @@
<module>camel-fory</module>
<module>camel-geocoder</module>
<module>camel-git</module>
- <module>camel-github</module>
<module>camel-github2</module>
<module>camel-google</module>
<module>camel-graphql</module>
diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index 3171a8132a56..624daab24279 100644
--- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -124,7 +124,6 @@ ftp
ftps
geocoder
git
-github
github2
google-bigquery
google-bigquery-sql
diff --git a/coverage/pom.xml b/coverage/pom.xml
index e95e4347d230..e43e5c2a3ddb 100644
--- a/coverage/pom.xml
+++ b/coverage/pom.xml
@@ -932,11 +932,6 @@
<artifactId>camel-git</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-github</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-google-bigquery</artifactId>
diff --git a/docs/components/modules/ROOT/examples/json/github.json b/docs/components/modules/ROOT/examples/json/github.json
deleted file mode 120000
index 02a7ea8fc83f..000000000000
--- a/docs/components/modules/ROOT/examples/json/github.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../components/camel-github/src/generated/resources/META-INF/org/apache/camel/component/github/github.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index 19f39e834e46..45f5676428bd 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -150,7 +150,6 @@
** xref:ftps-component.adoc[FTPS]
** xref:geocoder-component.adoc[Geocoder]
** xref:git-component.adoc[Git]
-** xref:github-component.adoc[GitHub]
** xref:github2-component.adoc[GitHub2]
** xref:google-summary.adoc[Google]
*** xref:google-bigquery-component.adoc[Google BigQuery]
diff --git a/docs/components/modules/ROOT/pages/github-component.adoc b/docs/components/modules/ROOT/pages/github-component.adoc
deleted file mode 120000
index 461bf537b5dd..000000000000
--- a/docs/components/modules/ROOT/pages/github-component.adoc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../components/camel-github/src/main/docs/github-component.adoc
\ No newline at end of file
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index 1ed0203c4040..98c4e40e01b4 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -305,6 +305,12 @@ Camel Grape was deprecated with Camel 4.1. The component is now removed.
Camel Grape was deprecated with Camel 4.0. The component is now removed.
+=== camel-github removal
+
+Camel GitHub was deprecated with Camel 4.18. The component is now removed.
+There is `camel-github2` to replace it.
+Technically, `camel-github` was based on Eclipse EGit which is no more active. `camel-github2` is based on `org.kohsuke:github-api`.
+
=== camel-telemetry
In order to prevent some potential span leakage in `camel-opentelemetry2` (see notes below) we had to perform some changes and introduce the following parameter:
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 61bfc08d3b3d..44790c7c3af9 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
@@ -1724,19 +1724,6 @@ public interface ComponentsBuilderFactory {
static GitComponentBuilderFactory.GitComponentBuilder git() {
return GitComponentBuilderFactory.git();
}
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * @return the dsl builder
- */
- static GithubComponentBuilderFactory.GithubComponentBuilder github() {
- return GithubComponentBuilderFactory.github();
- }
/**
* GitHub2 (camel-github2)
* Interact with the GitHub API.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GithubComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GithubComponentBuilderFactory.java
deleted file mode 100644
index 3fecd81f07e0..000000000000
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GithubComponentBuilderFactory.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.builder.component.dsl;
-
-import javax.annotation.processing.Generated;
-import org.apache.camel.Component;
-import org.apache.camel.builder.component.AbstractComponentBuilder;
-import org.apache.camel.builder.component.ComponentBuilder;
-import org.apache.camel.component.github.GitHubComponent;
-
-/**
- * Interact with the GitHub API.
- *
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
-public interface GithubComponentBuilderFactory {
-
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * @return the dsl builder
- */
- static GithubComponentBuilder github() {
- return new GithubComponentBuilderImpl();
- }
-
- /**
- * Builder for the GitHub component.
- */
- interface GithubComponentBuilder extends ComponentBuilder<GitHubComponent> {
-
-
- /**
- * 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 messages, or the likes, will
- * now be processed as a message and handled by the routing Error
- * Handler. Important: This is only possible if the 3rd party component
- * allows Camel to be alerted if an exception was thrown. Some
- * components handle this internally only, and therefore
- * bridgeErrorHandler is not possible. In other situations we may
- * improve the Camel component to hook into the 3rd party component and
- * make this possible for future releases. By default the consumer will
- * use the org.apache.camel.spi.ExceptionHandler to deal with
- * exceptions, that will be logged at WARN or ERROR level and ignored.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer
- *
- * @param bridgeErrorHandler the value to set
- * @return the dsl builder
- */
- default GithubComponentBuilder bridgeErrorHandler(boolean bridgeErrorHandler) {
- doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
- return this;
- }
-
-
- /**
- * 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.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: producer
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default GithubComponentBuilder lazyStartProducer(boolean lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
-
-
- /**
- * Whether autowiring is enabled. This is used for automatic autowiring
- * options (the option must be marked as autowired) by looking up in the
- * registry to find if there is a single instance of matching type,
- * which then gets configured on the component. This can be used for
- * automatic configuring JDBC data sources, JMS connection factories,
- * AWS Clients, etc.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: advanced
- *
- * @param autowiredEnabled the value to set
- * @return the dsl builder
- */
- default GithubComponentBuilder autowiredEnabled(boolean autowiredEnabled) {
- doSetProperty("autowiredEnabled", autowiredEnabled);
- return this;
- }
-
-
- /**
- * Used for enabling or disabling all consumer based health checks from
- * this component.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: health
- *
- * @param healthCheckConsumerEnabled the value to set
- * @return the dsl builder
- */
- default GithubComponentBuilder healthCheckConsumerEnabled(boolean healthCheckConsumerEnabled) {
- doSetProperty("healthCheckConsumerEnabled", healthCheckConsumerEnabled);
- return this;
- }
-
-
- /**
- * 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 checks globally by
- * setting camel.health.producersEnabled=true.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: health
- *
- * @param healthCheckProducerEnabled the value to set
- * @return the dsl builder
- */
- default GithubComponentBuilder healthCheckProducerEnabled(boolean healthCheckProducerEnabled) {
- doSetProperty("healthCheckProducerEnabled", healthCheckProducerEnabled);
- return this;
- }
-
- /**
- * GitHub OAuth token. Must be configured on either component or
- * endpoint.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauthToken the value to set
- * @return the dsl builder
- */
- default GithubComponentBuilder oauthToken(java.lang.String oauthToken) {
- doSetProperty("oauthToken", oauthToken);
- return this;
- }
- }
-
- class GithubComponentBuilderImpl
- extends AbstractComponentBuilder<GitHubComponent>
- implements GithubComponentBuilder {
- @Override
- protected GitHubComponent buildConcreteComponent() {
- return new GitHubComponent();
- }
- @Override
- protected boolean setPropertyOnComponent(
- Component component,
- String name,
- Object value) {
- switch (name) {
- case "bridgeErrorHandler": ((GitHubComponent) component).setBridgeErrorHandler((boolean) value); return true;
- case "lazyStartProducer": ((GitHubComponent) component).setLazyStartProducer((boolean) value); return true;
- case "autowiredEnabled": ((GitHubComponent) component).setAutowiredEnabled((boolean) value); return true;
- case "healthCheckConsumerEnabled": ((GitHubComponent) component).setHealthCheckConsumerEnabled((boolean) value); return true;
- case "healthCheckProducerEnabled": ((GitHubComponent) component).setHealthCheckProducerEnabled((boolean) value); return true;
- case "oauthToken": ((GitHubComponent) component).setOauthToken((java.lang.String) value); return true;
- default: return false;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 17defeffbf7a..b397888b4d9a 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -133,7 +133,6 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.GeoCoderEndpointBuilderFactory.GeoCoderBuilders,
org.apache.camel.builder.endpoint.dsl.GitEndpointBuilderFactory.GitBuilders,
org.apache.camel.builder.endpoint.dsl.GitHub2EndpointBuilderFactory.GitHub2Builders,
- org.apache.camel.builder.endpoint.dsl.GitHubEndpointBuilderFactory.GitHubBuilders,
org.apache.camel.builder.endpoint.dsl.GlanceEndpointBuilderFactory.GlanceBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleBigQueryEndpointBuilderFactory.GoogleBigQueryBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleBigQuerySQLEndpointBuilderFactory.GoogleBigQuerySQLBuilders,
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 965745470b9a..91b90651cb8a 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -130,7 +130,6 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.GeoCoderEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GitEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GitHub2EndpointBuilderFactory,
- org.apache.camel.builder.endpoint.dsl.GitHubEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GlanceEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleBigQueryEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleBigQuerySQLEndpointBuilderFactory,
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 a5db916ace59..2a61a14eac6f 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
@@ -5575,60 +5575,6 @@ public class StaticEndpointBuilders {
public static GitEndpointBuilderFactory.GitEndpointBuilder git(String componentName, String path) {
return GitEndpointBuilderFactory.endpointBuilder(componentName, path);
}
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * Syntax: <code>github:type/branchName</code>
- *
- * Path parameter: type (required)
- * What git operation to execute
- * There are 10 enums and the value can be one of: CLOSEPULLREQUEST,
- * PULLREQUESTCOMMENT, COMMIT, PULLREQUEST, TAG, PULLREQUESTSTATE,
- * PULLREQUESTFILES, GETCOMMITFILE, CREATEISSUE, EVENT
- *
- * Path parameter: branchName
- * Name of branch
- *
- * @param path type/branchName
- * @return the dsl builder
- */
- @Deprecated
- public static GitHubEndpointBuilderFactory.GitHubEndpointBuilder github(String path) {
- return github("github", path);
- }
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * Syntax: <code>github:type/branchName</code>
- *
- * Path parameter: type (required)
- * What git operation to execute
- * There are 10 enums and the value can be one of: CLOSEPULLREQUEST,
- * PULLREQUESTCOMMENT, COMMIT, PULLREQUEST, TAG, PULLREQUESTSTATE,
- * PULLREQUESTFILES, GETCOMMITFILE, CREATEISSUE, EVENT
- *
- * Path parameter: branchName
- * Name of branch
- *
- * @param componentName to use a custom component name for the endpoint
- * instead of the default name
- * @param path type/branchName
- * @return the dsl builder
- */
- @Deprecated
- public static GitHubEndpointBuilderFactory.GitHubEndpointBuilder github(String componentName, String path) {
- return GitHubEndpointBuilderFactory.endpointBuilder(componentName, path);
- }
/**
* GitHub2 (camel-github2)
* Interact with the GitHub API.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java
deleted file mode 100644
index 1ffe466ddb24..000000000000
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java
+++ /dev/null
@@ -1,1256 +0,0 @@
-/* Generated by camel build tools - do NOT edit this file! */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.builder.endpoint.dsl;
-
-import java.util.*;
-import java.util.concurrent.*;
-import java.util.function.*;
-import java.util.stream.*;
-import javax.annotation.processing.Generated;
-import org.apache.camel.builder.EndpointConsumerBuilder;
-import org.apache.camel.builder.EndpointProducerBuilder;
-import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
-
-/**
- * Interact with the GitHub API.
- *
- * Generated by camel build tools - do NOT edit this file!
- */
-@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
-public interface GitHubEndpointBuilderFactory {
-
- /**
- * Builder for endpoint consumers for the GitHub component.
- */
- public interface GitHubEndpointConsumerBuilder
- extends
- EndpointConsumerBuilder {
- default AdvancedGitHubEndpointConsumerBuilder advanced() {
- return (AdvancedGitHubEndpointConsumerBuilder) this;
- }
- /**
- * GitHub repository name.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: common
- *
- * @param repoName the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder repoName(String repoName) {
- doSetProperty("repoName", repoName);
- return this;
- }
- /**
- * GitHub repository owner (organization).
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: common
- *
- * @param repoOwner the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder repoOwner(String repoOwner) {
- doSetProperty("repoOwner", repoOwner);
- return this;
- }
- /**
- * Whether the commit consumer should store the commit message or the
- * raw org.eclipse.egit.github.core.RepositoryCommit object as the
- * message body.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: consumer
- *
- * @param commitMessageAsBody the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder commitMessageAsBody(boolean commitMessageAsBody) {
- doSetProperty("commitMessageAsBody", commitMessageAsBody);
- return this;
- }
- /**
- * Whether the commit consumer should store the commit message or the
- * raw org.eclipse.egit.github.core.RepositoryCommit object as the
- * message body.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: true
- * Group: consumer
- *
- * @param commitMessageAsBody the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder commitMessageAsBody(String commitMessageAsBody) {
- doSetProperty("commitMessageAsBody", commitMessageAsBody);
- return this;
- }
- /**
- * If the polling consumer did not poll any files, you can enable this
- * option to send an empty message (no body) instead.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer
- *
- * @param sendEmptyMessageWhenIdle the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder sendEmptyMessageWhenIdle(boolean sendEmptyMessageWhenIdle) {
- doSetProperty("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle);
- return this;
- }
- /**
- * If the polling consumer did not poll any files, you can enable this
- * option to send an empty message (no body) instead.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer
- *
- * @param sendEmptyMessageWhenIdle the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder sendEmptyMessageWhenIdle(String sendEmptyMessageWhenIdle) {
- doSetProperty("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle);
- return this;
- }
- /**
- * The starting sha to use for polling commits with the commit consumer.
- * The value can either be a sha for the sha to start from, or use
- * beginning to start from the beginning, or last to start from the last
- * commit.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Default: last
- * Group: consumer
- *
- * @param startingSha the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder startingSha(String startingSha) {
- doSetProperty("startingSha", startingSha);
- return this;
- }
- /**
- * The number of subsequent error polls (failed due some error) that
- * should happen before the backoffMultipler should kick-in.
- *
- * The option is a: <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffErrorThreshold the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder backoffErrorThreshold(int backoffErrorThreshold) {
- doSetProperty("backoffErrorThreshold", backoffErrorThreshold);
- return this;
- }
- /**
- * The number of subsequent error polls (failed due some error) that
- * should happen before the backoffMultipler should kick-in.
- *
- * The option will be converted to a <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffErrorThreshold the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder backoffErrorThreshold(String backoffErrorThreshold) {
- doSetProperty("backoffErrorThreshold", backoffErrorThreshold);
- return this;
- }
- /**
- * The number of subsequent idle polls that should happen before the
- * backoffMultipler should kick-in.
- *
- * The option is a: <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffIdleThreshold the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder backoffIdleThreshold(int backoffIdleThreshold) {
- doSetProperty("backoffIdleThreshold", backoffIdleThreshold);
- return this;
- }
- /**
- * The number of subsequent idle polls that should happen before the
- * backoffMultipler should kick-in.
- *
- * The option will be converted to a <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffIdleThreshold the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder backoffIdleThreshold(String backoffIdleThreshold) {
- doSetProperty("backoffIdleThreshold", backoffIdleThreshold);
- return this;
- }
- /**
- * 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 happening again. When this option is in use then
- * backoffIdleThreshold and/or backoffErrorThreshold must also be
- * configured.
- *
- * The option is a: <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffMultiplier the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder backoffMultiplier(int backoffMultiplier) {
- doSetProperty("backoffMultiplier", backoffMultiplier);
- return this;
- }
- /**
- * 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 happening again. When this option is in use then
- * backoffIdleThreshold and/or backoffErrorThreshold must also be
- * configured.
- *
- * The option will be converted to a <code>int</code> type.
- *
- * Group: scheduler
- *
- * @param backoffMultiplier the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder backoffMultiplier(String backoffMultiplier) {
- doSetProperty("backoffMultiplier", backoffMultiplier);
- return this;
- }
- /**
- * Milliseconds before the next poll.
- *
- * The option is a: <code>long</code> type.
- *
- * Default: 500
- * Group: scheduler
- *
- * @param delay the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder delay(long delay) {
- doSetProperty("delay", delay);
- return this;
- }
- /**
- * Milliseconds before the next poll.
- *
- * The option will be converted to a <code>long</code> type.
- *
- * Default: 500
- * Group: scheduler
- *
- * @param delay the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder delay(String delay) {
- doSetProperty("delay", delay);
- return this;
- }
- /**
- * If greedy is enabled, then the ScheduledPollConsumer will run
- * immediately again, if the previous run polled 1 or more messages.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: scheduler
- *
- * @param greedy the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder greedy(boolean greedy) {
- doSetProperty("greedy", greedy);
- return this;
- }
- /**
- * If greedy is enabled, then the ScheduledPollConsumer will run
- * immediately again, if the previous run polled 1 or more messages.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: false
- * Group: scheduler
- *
- * @param greedy the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder greedy(String greedy) {
- doSetProperty("greedy", greedy);
- return this;
- }
- /**
- * Milliseconds before the first poll starts.
- *
- * The option is a: <code>long</code> type.
- *
- * Default: 1000
- * Group: scheduler
- *
- * @param initialDelay the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder initialDelay(long initialDelay) {
- doSetProperty("initialDelay", initialDelay);
- return this;
- }
- /**
- * Milliseconds before the first poll starts.
- *
- * The option will be converted to a <code>long</code> type.
- *
- * Default: 1000
- * Group: scheduler
- *
- * @param initialDelay the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder initialDelay(String initialDelay) {
- doSetProperty("initialDelay", initialDelay);
- return this;
- }
- /**
- * Specifies a maximum limit of number of fires. So if you set it to 1,
- * the scheduler will only fire once. If you set it to 5, it will only
- * fire five times. A value of zero or negative means fire forever.
- *
- * The option is a: <code>long</code> type.
- *
- * Default: 0
- * Group: scheduler
- *
- * @param repeatCount the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder repeatCount(long repeatCount) {
- doSetProperty("repeatCount", repeatCount);
- return this;
- }
- /**
- * Specifies a maximum limit of number of fires. So if you set it to 1,
- * the scheduler will only fire once. If you set it to 5, it will only
- * fire five times. A value of zero or negative means fire forever.
- *
- * The option will be converted to a <code>long</code> type.
- *
- * Default: 0
- * Group: scheduler
- *
- * @param repeatCount the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder repeatCount(String repeatCount) {
- doSetProperty("repeatCount", repeatCount);
- return this;
- }
- /**
- * The consumer logs a start/complete log line when it polls. This
- * option allows you to configure the logging level for that.
- *
- * The option is a: <code>org.apache.camel.LoggingLevel</code> type.
- *
- * Default: TRACE
- * Group: scheduler
- *
- * @param runLoggingLevel the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder runLoggingLevel(org.apache.camel.LoggingLevel runLoggingLevel) {
- doSetProperty("runLoggingLevel", runLoggingLevel);
- return this;
- }
- /**
- * The consumer logs a start/complete log line when it polls. This
- * option allows you to configure the logging level for that.
- *
- * The option will be converted to a
- * <code>org.apache.camel.LoggingLevel</code> type.
- *
- * Default: TRACE
- * Group: scheduler
- *
- * @param runLoggingLevel the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder runLoggingLevel(String runLoggingLevel) {
- doSetProperty("runLoggingLevel", runLoggingLevel);
- return this;
- }
- /**
- * Allows for configuring a custom/shared thread pool to use for the
- * consumer. By default each consumer has its own single threaded thread
- * pool.
- *
- * The option is a:
- * <code>java.util.concurrent.ScheduledExecutorService</code> type.
- *
- * Group: scheduler
- *
- * @param scheduledExecutorService the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService) {
- doSetProperty("scheduledExecutorService", scheduledExecutorService);
- return this;
- }
- /**
- * Allows for configuring a custom/shared thread pool to use for the
- * consumer. By default each consumer has its own single threaded thread
- * pool.
- *
- * The option will be converted to a
- * <code>java.util.concurrent.ScheduledExecutorService</code> type.
- *
- * Group: scheduler
- *
- * @param scheduledExecutorService the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder scheduledExecutorService(String scheduledExecutorService) {
- doSetProperty("scheduledExecutorService", scheduledExecutorService);
- return this;
- }
- /**
- * To use a cron scheduler from either camel-spring or camel-quartz
- * component. Use value spring or quartz for built in scheduler.
- *
- * The option is a: <code>java.lang.Object</code> type.
- *
- * Default: none
- * Group: scheduler
- *
- * @param scheduler the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder scheduler(Object scheduler) {
- doSetProperty("scheduler", scheduler);
- return this;
- }
- /**
- * To use a cron scheduler from either camel-spring or camel-quartz
- * component. Use value spring or quartz for built in scheduler.
- *
- * The option will be converted to a <code>java.lang.Object</code> type.
- *
- * Default: none
- * Group: scheduler
- *
- * @param scheduler the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder scheduler(String scheduler) {
- doSetProperty("scheduler", scheduler);
- return this;
- }
- /**
- * To configure additional properties when using a custom scheduler or
- * any of the Quartz, Spring based scheduler. This is a multi-value
- * option with prefix: scheduler.
- *
- * The option is a: <code>java.util.Map<java.lang.String,
- * java.lang.Object></code> type.
- * The option is multivalued, and you can use the
- * schedulerProperties(String, Object) method to add a value (call the
- * method multiple times to set more values).
- *
- * Group: scheduler
- *
- * @param key the option key
- * @param value the option value
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder schedulerProperties(String key, Object value) {
- doSetMultiValueProperty("schedulerProperties", "scheduler." + key, value);
- return this;
- }
- /**
- * To configure additional properties when using a custom scheduler or
- * any of the Quartz, Spring based scheduler. This is a multi-value
- * option with prefix: scheduler.
- *
- * The option is a: <code>java.util.Map<java.lang.String,
- * java.lang.Object></code> type.
- * The option is multivalued, and you can use the
- * schedulerProperties(String, Object) method to add a value (call the
- * method multiple times to set more values).
- *
- * Group: scheduler
- *
- * @param values the values
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder schedulerProperties(Map values) {
- doSetMultiValueProperties("schedulerProperties", "scheduler.", values);
- return this;
- }
- /**
- * Whether the scheduler should be auto started.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param startScheduler the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder startScheduler(boolean startScheduler) {
- doSetProperty("startScheduler", startScheduler);
- return this;
- }
- /**
- * Whether the scheduler should be auto started.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param startScheduler the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder startScheduler(String startScheduler) {
- doSetProperty("startScheduler", startScheduler);
- return this;
- }
- /**
- * Time unit for initialDelay and delay options.
- *
- * The option is a: <code>java.util.concurrent.TimeUnit</code> type.
- *
- * Default: MILLISECONDS
- * Group: scheduler
- *
- * @param timeUnit the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) {
- doSetProperty("timeUnit", timeUnit);
- return this;
- }
- /**
- * Time unit for initialDelay and delay options.
- *
- * The option will be converted to a
- * <code>java.util.concurrent.TimeUnit</code> type.
- *
- * Default: MILLISECONDS
- * Group: scheduler
- *
- * @param timeUnit the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder timeUnit(String timeUnit) {
- doSetProperty("timeUnit", timeUnit);
- return this;
- }
- /**
- * Controls if fixed delay or fixed rate is used. See
- * ScheduledExecutorService in JDK for details.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param useFixedDelay the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder useFixedDelay(boolean useFixedDelay) {
- doSetProperty("useFixedDelay", useFixedDelay);
- return this;
- }
- /**
- * Controls if fixed delay or fixed rate is used. See
- * ScheduledExecutorService in JDK for details.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: true
- * Group: scheduler
- *
- * @param useFixedDelay the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder useFixedDelay(String useFixedDelay) {
- doSetProperty("useFixedDelay", useFixedDelay);
- return this;
- }
- /**
- * GitHub OAuth token. Must be configured on either component or
- * endpoint.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauthToken the value to set
- * @return the dsl builder
- */
- default GitHubEndpointConsumerBuilder oauthToken(String oauthToken) {
- doSetProperty("oauthToken", oauthToken);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint consumers for the GitHub component.
- */
- public interface AdvancedGitHubEndpointConsumerBuilder
- extends
- EndpointConsumerBuilder {
- default GitHubEndpointConsumerBuilder basic() {
- return (GitHubEndpointConsumerBuilder) this;
- }
- /**
- * 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 messages, or the likes, will
- * now be processed as a message and handled by the routing Error
- * Handler. Important: This is only possible if the 3rd party component
- * allows Camel to be alerted if an exception was thrown. Some
- * components handle this internally only, and therefore
- * bridgeErrorHandler is not possible. In other situations we may
- * improve the Camel component to hook into the 3rd party component and
- * make this possible for future releases. By default the consumer will
- * use the org.apache.camel.spi.ExceptionHandler to deal with
- * exceptions, that will be logged at WARN or ERROR level and ignored.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer (advanced)
- *
- * @param bridgeErrorHandler the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder bridgeErrorHandler(boolean bridgeErrorHandler) {
- doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
- return this;
- }
- /**
- * 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 messages, or the likes, will
- * now be processed as a message and handled by the routing Error
- * Handler. Important: This is only possible if the 3rd party component
- * allows Camel to be alerted if an exception was thrown. Some
- * components handle this internally only, and therefore
- * bridgeErrorHandler is not possible. In other situations we may
- * improve the Camel component to hook into the 3rd party component and
- * make this possible for future releases. By default the consumer will
- * use the org.apache.camel.spi.ExceptionHandler to deal with
- * exceptions, that will be logged at WARN or ERROR level and ignored.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: false
- * Group: consumer (advanced)
- *
- * @param bridgeErrorHandler the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder bridgeErrorHandler(String bridgeErrorHandler) {
- doSetProperty("bridgeErrorHandler", bridgeErrorHandler);
- return this;
- }
- /**
- * To specify a custom strategy that configures how the EventsConsumer
- * fetches events.
- *
- * The option is a:
- * <code>org.apache.camel.component.github.event.GitHubEventFetchStrategy</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param eventFetchStrategy the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder eventFetchStrategy(org.apache.camel.component.github.event.GitHubEventFetchStrategy eventFetchStrategy) {
- doSetProperty("eventFetchStrategy", eventFetchStrategy);
- return this;
- }
- /**
- * To specify a custom strategy that configures how the EventsConsumer
- * fetches events.
- *
- * The option will be converted to a
- * <code>org.apache.camel.component.github.event.GitHubEventFetchStrategy</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param eventFetchStrategy the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder eventFetchStrategy(String eventFetchStrategy) {
- doSetProperty("eventFetchStrategy", eventFetchStrategy);
- return this;
- }
- /**
- * 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.
- *
- * The option is a: <code>org.apache.camel.spi.ExceptionHandler</code>
- * type.
- *
- * Group: consumer (advanced)
- *
- * @param exceptionHandler the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder exceptionHandler(org.apache.camel.spi.ExceptionHandler exceptionHandler) {
- doSetProperty("exceptionHandler", exceptionHandler);
- return this;
- }
- /**
- * 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.
- *
- * The option will be converted to a
- * <code>org.apache.camel.spi.ExceptionHandler</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exceptionHandler the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder exceptionHandler(String exceptionHandler) {
- doSetProperty("exceptionHandler", exceptionHandler);
- return this;
- }
- /**
- * Sets the exchange pattern when the consumer creates an exchange.
- *
- * The option is a: <code>org.apache.camel.ExchangePattern</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exchangePattern the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder exchangePattern(org.apache.camel.ExchangePattern exchangePattern) {
- doSetProperty("exchangePattern", exchangePattern);
- return this;
- }
- /**
- * Sets the exchange pattern when the consumer creates an exchange.
- *
- * The option will be converted to a
- * <code>org.apache.camel.ExchangePattern</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param exchangePattern the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder exchangePattern(String exchangePattern) {
- doSetProperty("exchangePattern", exchangePattern);
- return this;
- }
- /**
- * 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.
- *
- * The option is a:
- * <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param pollStrategy the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder pollStrategy(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy) {
- doSetProperty("pollStrategy", pollStrategy);
- return this;
- }
- /**
- * 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.
- *
- * The option will be converted to a
- * <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type.
- *
- * Group: consumer (advanced)
- *
- * @param pollStrategy the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointConsumerBuilder pollStrategy(String pollStrategy) {
- doSetProperty("pollStrategy", pollStrategy);
- return this;
- }
- }
-
- /**
- * Builder for endpoint producers for the GitHub component.
- */
- public interface GitHubEndpointProducerBuilder
- extends
- EndpointProducerBuilder {
- default AdvancedGitHubEndpointProducerBuilder advanced() {
- return (AdvancedGitHubEndpointProducerBuilder) this;
- }
-
- /**
- * GitHub repository name.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: common
- *
- * @param repoName the value to set
- * @return the dsl builder
- */
- default GitHubEndpointProducerBuilder repoName(String repoName) {
- doSetProperty("repoName", repoName);
- return this;
- }
- /**
- * GitHub repository owner (organization).
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: common
- *
- * @param repoOwner the value to set
- * @return the dsl builder
- */
- default GitHubEndpointProducerBuilder repoOwner(String repoOwner) {
- doSetProperty("repoOwner", repoOwner);
- return this;
- }
- /**
- * To use the given encoding when getting a git commit file.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param encoding the value to set
- * @return the dsl builder
- */
- default GitHubEndpointProducerBuilder encoding(String encoding) {
- doSetProperty("encoding", encoding);
- return this;
- }
- /**
- * To set git commit status state.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param state the value to set
- * @return the dsl builder
- */
- default GitHubEndpointProducerBuilder state(String state) {
- doSetProperty("state", state);
- return this;
- }
- /**
- * To set git commit status target url.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: producer
- *
- * @param targetUrl the value to set
- * @return the dsl builder
- */
- default GitHubEndpointProducerBuilder targetUrl(String targetUrl) {
- doSetProperty("targetUrl", targetUrl);
- return this;
- }
- /**
- * GitHub OAuth token. Must be configured on either component or
- * endpoint.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauthToken the value to set
- * @return the dsl builder
- */
- default GitHubEndpointProducerBuilder oauthToken(String oauthToken) {
- doSetProperty("oauthToken", oauthToken);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint producers for the GitHub component.
- */
- public interface AdvancedGitHubEndpointProducerBuilder extends EndpointProducerBuilder {
- default GitHubEndpointProducerBuilder basic() {
- return (GitHubEndpointProducerBuilder) this;
- }
-
- /**
- * 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.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: false
- * Group: producer (advanced)
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointProducerBuilder lazyStartProducer(boolean lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- /**
- * 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.
- *
- * The option will be converted to a <code>boolean</code> type.
- *
- * Default: false
- * Group: producer (advanced)
- *
- * @param lazyStartProducer the value to set
- * @return the dsl builder
- */
- default AdvancedGitHubEndpointProducerBuilder lazyStartProducer(String lazyStartProducer) {
- doSetProperty("lazyStartProducer", lazyStartProducer);
- return this;
- }
- }
-
- /**
- * Builder for endpoint for the GitHub component.
- */
- public interface GitHubEndpointBuilder
- extends
- GitHubEndpointConsumerBuilder,
- GitHubEndpointProducerBuilder {
- default AdvancedGitHubEndpointBuilder advanced() {
- return (AdvancedGitHubEndpointBuilder) this;
- }
-
- /**
- * GitHub repository name.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: common
- *
- * @param repoName the value to set
- * @return the dsl builder
- */
- default GitHubEndpointBuilder repoName(String repoName) {
- doSetProperty("repoName", repoName);
- return this;
- }
- /**
- * GitHub repository owner (organization).
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Required: true
- * Group: common
- *
- * @param repoOwner the value to set
- * @return the dsl builder
- */
- default GitHubEndpointBuilder repoOwner(String repoOwner) {
- doSetProperty("repoOwner", repoOwner);
- return this;
- }
- /**
- * GitHub OAuth token. Must be configured on either component or
- * endpoint.
- *
- * The option is a: <code>java.lang.String</code> type.
- *
- * Group: security
- *
- * @param oauthToken the value to set
- * @return the dsl builder
- */
- default GitHubEndpointBuilder oauthToken(String oauthToken) {
- doSetProperty("oauthToken", oauthToken);
- return this;
- }
- }
-
- /**
- * Advanced builder for endpoint for the GitHub component.
- */
- public interface AdvancedGitHubEndpointBuilder
- extends
- AdvancedGitHubEndpointConsumerBuilder,
- AdvancedGitHubEndpointProducerBuilder {
- default GitHubEndpointBuilder basic() {
- return (GitHubEndpointBuilder) this;
- }
-
- }
-
- public interface GitHubBuilders {
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * @return the dsl builder for the headers' name.
- */
- @Deprecated
- default GitHubHeaderNameBuilder github() {
- return GitHubHeaderNameBuilder.INSTANCE;
- }
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * Syntax: <code>github:type/branchName</code>
- *
- * Path parameter: type (required)
- * What git operation to execute
- * There are 10 enums and the value can be one of: CLOSEPULLREQUEST,
- * PULLREQUESTCOMMENT, COMMIT, PULLREQUEST, TAG, PULLREQUESTSTATE,
- * PULLREQUESTFILES, GETCOMMITFILE, CREATEISSUE, EVENT
- *
- * Path parameter: branchName
- * Name of branch
- *
- * @param path type/branchName
- * @return the dsl builder
- */
- @Deprecated
- default GitHubEndpointBuilder github(String path) {
- return GitHubEndpointBuilderFactory.endpointBuilder("github", path);
- }
- /**
- * GitHub (camel-github)
- * Interact with the GitHub API.
- *
- * Category: file,cloud,api
- * Since: 2.15
- * Maven coordinates: org.apache.camel:camel-github
- *
- * Syntax: <code>github:type/branchName</code>
- *
- * Path parameter: type (required)
- * What git operation to execute
- * There are 10 enums and the value can be one of: CLOSEPULLREQUEST,
- * PULLREQUESTCOMMENT, COMMIT, PULLREQUEST, TAG, PULLREQUESTSTATE,
- * PULLREQUESTFILES, GETCOMMITFILE, CREATEISSUE, EVENT
- *
- * Path parameter: branchName
- * Name of branch
- *
- * @param componentName to use a custom component name for the endpoint
- * instead of the default name
- * @param path type/branchName
- * @return the dsl builder
- */
- @Deprecated
- default GitHubEndpointBuilder github(String componentName, String path) {
- return GitHubEndpointBuilderFactory.endpointBuilder(componentName, path);
- }
-
- }
- /**
- * The builder of headers' name for the GitHub component.
- */
- public static class GitHubHeaderNameBuilder {
- /**
- * The internal instance of the builder used to access to all the
- * methods representing the name of headers.
- */
- private static final GitHubHeaderNameBuilder INSTANCE = new GitHubHeaderNameBuilder();
-
- /**
- * The pull request.
- *
- * The option is a: {@code PullRequest or Integer} type.
- *
- * Group: common
- *
- * @return the name of the header {@code GitHubPullRequest}.
- */
- public String gitHubPullRequest() {
- return "GitHubPullRequest";
- }
- /**
- * The id of the comment to reply to.
- *
- * The option is a: {@code Integer} type.
- *
- * Group: producer
- *
- * @return the name of the header {@code GitHubInResponseTo}.
- */
- public String gitHubInResponseTo() {
- return "GitHubInResponseTo";
- }
- /**
- * The sha of the head of the pull request.
- *
- * The option is a: {@code String} type.
- *
- * Group: common
- *
- * @return the name of the header {@code
- * GitHubPullRequestHeadCommitSHA}.
- */
- public String gitHubPullRequestHeadCommitSHA() {
- return "GitHubPullRequestHeadCommitSHA";
- }
- /**
- * The title of the issue.
- *
- * The option is a: {@code String} type.
- *
- * Group: producer
- *
- * @return the name of the header {@code GitHubIssueTitle}.
- */
- public String gitHubIssueTitle() {
- return "GitHubIssueTitle";
- }
- /**
- * The commit author.
- *
- * The option is a: {@code String} type.
- *
- * Group: consumer
- *
- * @return the name of the header {@code GitHubCommitAuthor}.
- */
- public String gitHubCommitAuthor() {
- return "CamelGitHubCommitAuthor";
- }
- /**
- * The committer name.
- *
- * The option is a: {@code String} type.
- *
- * Group: consumer
- *
- * @return the name of the header {@code GitHubCommitCommitter}.
- */
- public String gitHubCommitCommitter() {
- return "CamelGitHubCommitCommitter";
- }
- /**
- * The commit sha.
- *
- * The option is a: {@code String} type.
- *
- * Group: consumer
- *
- * @return the name of the header {@code GitHubCommitSha}.
- */
- public String gitHubCommitSha() {
- return "CamelGitHubCommitSha";
- }
- /**
- * The commit URL.
- *
- * The option is a: {@code String} type.
- *
- * Group: consumer
- *
- * @return the name of the header {@code GitHubCommitUrl}.
- */
- public String gitHubCommitUrl() {
- return "CamelGitHubCommitUrl";
- }
- /**
- * The event payload.
- *
- * The option is a: {@code
- * org.eclipse.egit.github.core.event.EventPayload} type.
- *
- * Group: consumer
- *
- * @return the name of the header {@code GitHubEventPayload}.
- */
- public String gitHubEventPayload() {
- return "CamelGitHubEventPayload";
- }
- }
- static GitHubEndpointBuilder endpointBuilder(String componentName, String path) {
- class GitHubEndpointBuilderImpl extends AbstractEndpointBuilder implements GitHubEndpointBuilder, AdvancedGitHubEndpointBuilder {
- public GitHubEndpointBuilderImpl(String path) {
- super(componentName, path);
- }
- }
- return new GitHubEndpointBuilderImpl(path);
- }
-}
\ No newline at end of file
diff --git a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index 13ac5de8bf34..3ceba251d89b 100644
--- a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++ b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -141,7 +141,6 @@ org.apache.camel.component.fop.FopComponent=camel:fop
org.apache.camel.component.freemarker.FreemarkerComponent=camel:freemarker
org.apache.camel.component.geocoder.GeoCoderComponent=camel:geocoder
org.apache.camel.component.git.GitComponent=camel:git
-org.apache.camel.component.github.GitHubComponent=camel:github
org.apache.camel.component.github2.GitHub2Component=camel:github2
org.apache.camel.component.google.bigquery.GoogleBigQueryComponent=camel:google-bigquery
org.apache.camel.component.google.bigquery.sql.GoogleBigQuerySQLComponent=camel:google-bigquery
diff --git a/parent/pom.xml b/parent/pom.xml
index 3054b99f6bc8..2ef285659ed1 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -149,7 +149,6 @@
<docling-java-version>0.5.2</docling-java-version>
<docker-java-version>3.7.1</docker-java-version>
<dropbox-version>7.0.0</dropbox-version>
- <egit-github-core-version>2.1.5</egit-github-core-version>
<ehcache3-version>3.12.0</ehcache3-version>
<!-- github-api (kohsuke) for camel-github2 -->
<github-api-version>1.330</github-api-version>
@@ -1436,11 +1435,6 @@
<artifactId>camel-git</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-github</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-github2</artifactId>