CAMEL-23582: camel-github2 - align Exchange header constant names with Camel naming convention#23454
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
gnodet
left a comment
There was a problem hiding this comment.
LGTM. All four producer-side header values correctly renamed to Camel-prefixed form, consistent with the existing consumer-side constants (CamelGitHubCommitAuthor, CamelGitHubCommitSha, etc.). The SHA -> Sha PascalCase normalization is correct. Upgrade guide entry is thorough with the old-to-new mapping table. Generated artifacts (catalog JSON, Endpoint DSL) are in sync.
Claude Code on behalf of Guillaume Nodet
|
🧪 CI tested the following changed modules:
All tested modules (10 modules)
|
…h Camel naming convention Renames the producer-side Exchange header string values in GitHub2Constants from non-Camel prefixed values (GitHubPullRequest, GitHubInResponseTo, GitHubPullRequestHeadCommitSHA, GitHubIssueTitle) to CamelGitHub<Name>, following the convention used across the rest of the Camel component catalog and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira). The Java field names (GITHUB_PULLREQUEST, GITHUB_INRESPONSETO, GITHUB_PULLREQUEST_HEAD_COMMIT_SHA, GITHUB_ISSUE_TITLE) are unchanged so routes referencing the constants symbolically continue to work; routes using the literal string values must be updated (documented in the 4.21 upgrade guide). The producer Javadocs that quote these header names are updated for consistency. The consumer-side constants (GITHUB_COMMIT_AUTHOR, GITHUB_COMMIT_COMMITTER, GITHUB_COMMIT_SHA, GITHUB_COMMIT_URL, GITHUB_EVENT_PAYLOAD) were already Camel-prefixed and are unchanged, as is the GITHUB_CLIENT registry-lookup key. Note: CAMEL-23582 originally also scoped camel-github, but that deprecated component was removed in Camel 4.21 (commit "Remove camel-github component") before this rename, so only camel-github2 is addressed here. The generated Endpoint DSL accessor gitHubPullRequestHeadCommitSHA() has been renamed to gitHubPullRequestHeadCommitSha() as a consequence of aligning the SHA acronym casing; the other accessors keep their names but return the new Camel-prefixed values. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Summary
Renames the producer-side Exchange header string values in
GitHub2Constantsfrom non-Camel prefixed values (
GitHubPullRequest,GitHubInResponseTo,GitHubPullRequestHeadCommitSHA,GitHubIssueTitle) toCamelGitHub<Name>,following the convention used across the rest of the Camel component catalog
and matching the pattern established in CAMEL-23526 (
camel-cxf), CAMEL-23522(
camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532(
camel-vertx-websocket/camel-atmosphere-websocket/camel-iggy), andCAMEL-23576 (
camel-jira).The Java field names (
GITHUB_PULLREQUEST,GITHUB_INRESPONSETO,GITHUB_PULLREQUEST_HEAD_COMMIT_SHA,GITHUB_ISSUE_TITLE) are unchanged soroutes referencing the constants symbolically continue to work; routes using
the literal string values must be updated (documented in the 4.21 upgrade
guide). The producer Javadocs that quote these header names are updated for
consistency.
Scope note: camel-github removed
CAMEL-23582 originally scoped both
camel-githubandcamel-github2. Thedeprecated
camel-githubcomponent was removed in Camel 4.21 (commit2eec2f35fae"Remove camel-github component") before this rename could beapplied, so only
camel-github2is addressed here.Already-compliant constants left unchanged
GITHUB_COMMIT_AUTHOR,GITHUB_COMMIT_COMMITTER,GITHUB_COMMIT_SHA,GITHUB_COMMIT_URL,GITHUB_EVENT_PAYLOAD) were alreadyCamel-prefixed (CamelGitHubCommitAuthor, etc.).GITHUB_CLIENT(github2Client) is a registry-lookup key, not an Exchangeheader, and is unchanged.
Generated artifacts
components/camel-github2/.../github2.json+ catalog mirrordsl/camel-endpointdsl/.../GitHub2EndpointBuilderFactory.java— thegitHubPullRequestHeadCommitSHA()accessor is renamed togitHubPullRequestHeadCommitSha()(SHA acronym casing); the other accessorskeep their names but return the new
Camel-prefixed values.Backports
camel-4.18.x:camel-github2exists with the same legacy values — backportapplies. Will be filed as a follow-up PR.
camel-4.14.x:camel-github2does not exist on that branch — nobackport.
Test plan
mvn testincomponents/camel-github2— passescamel-github2regenartifacts included
=== camel-github2, cross-referencingthe
camel-githubremovalTracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino