This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 42b2b50bad6a97944c9ac28d7fee71c9914964a6 Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Oct 4 10:08:40 2021 +0200 CAMEL-17034 - Camel-Github: StartingSha should be an URI param and not an URI path --- .../component/github/GitHubEndpointConfigurer.java | 6 ++++ .../component/github/GitHubEndpointUriFactory.java | 1 - .../org/apache/camel/component/github/github.json | 2 +- .../builder/endpoint/StaticEndpointBuilders.java | 12 -------- .../endpoint/dsl/GitHubEndpointBuilderFactory.java | 32 ++++++++++++---------- 5 files changed, 25 insertions(+), 28 deletions(-) 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 index 7bb1bf7..6c52bbb 100644 --- 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 @@ -63,6 +63,8 @@ public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implemen 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; @@ -119,6 +121,8 @@ public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implemen 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; @@ -176,6 +180,8 @@ public class GitHubEndpointConfigurer extends PropertyConfigurerSupport implemen 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(); 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 index 0e9021d..f5f9c96 100644 --- 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 @@ -71,7 +71,6 @@ public class GitHubEndpointUriFactory extends org.apache.camel.support.component uri = buildPathParameter(syntax, uri, "type", null, true, copy); uri = buildPathParameter(syntax, uri, "branchName", null, false, copy); - uri = buildPathParameter(syntax, uri, "startingSha", "last", false, copy); uri = buildQueryParameters(uri, copy, encode); return uri; } diff --git a/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json b/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json index 1ef3e18..77edb6b 100644 --- a/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json +++ b/components/camel-github/src/generated/resources/org/apache/camel/component/github/github.json @@ -30,11 +30,11 @@ "properties": { "type": { "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "object", "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": { "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" }, - "startingSha": { "kind": "path", "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 last commit." }, "repoName": { "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": { "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)" }, "bridgeErrorHandler": { "kind": "parameter", "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 occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...] "sendEmptyMessageWhenIdle": { "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": { "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 last commit." }, "eventFetchStrategy": { "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": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...] "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 8d68758..7069e6d 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -5294,12 +5294,6 @@ public class StaticEndpointBuilders { * Path parameter: branchName * Name of branch * - * Path parameter: 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 beginning to - * start from the beginning, or last to start from the last commit. - * Default value: last - * * @param path type/branchName * @return the dsl builder */ @@ -5326,12 +5320,6 @@ public class StaticEndpointBuilders { * Path parameter: branchName * Name of branch * - * Path parameter: 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 beginning to - * start from the beginning, or last to start from the last commit. - * Default value: last - * * @param componentName to use a custom component name for the endpoint * instead of the default name * @param path type/branchName diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java index a3414ee..336b64c 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GitHubEndpointBuilderFactory.java @@ -157,6 +157,24 @@ public interface GitHubEndpointBuilderFactory { 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. * @@ -1049,13 +1067,6 @@ public interface GitHubEndpointBuilderFactory { * Path parameter: branchName * Name of branch * - * Path parameter: 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 - * beginning to start from the beginning, or last to start from the last - * commit. - * Default value: last - * * @param path type/branchName * @return the dsl builder */ @@ -1081,13 +1092,6 @@ public interface GitHubEndpointBuilderFactory { * Path parameter: branchName * Name of branch * - * Path parameter: 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 - * beginning to start from the beginning, or last to start from the last - * commit. - * Default value: last - * * @param componentName to use a custom component name for the endpoint * instead of the default name * @param path type/branchName
