[backport camel-4.18.x] CAMEL-23582: camel-github2 - align Exchange header constant names with Camel naming convention#23537
Open
oscerd wants to merge 1 commit into
Conversation
davsclaus
approved these changes
May 26, 2026
gnodet
approved these changes
May 26, 2026
Contributor
gnodet
left a comment
There was a problem hiding this comment.
Clean header rename backport for camel-github2 to 4.18.x. Renames GitHubPullRequest → CamelGitHubPullRequest, GitHubInResponseTo → CamelGitHubInResponseTo, GitHubPullRequestHeadCommitSHA → CamelGitHubPullRequestHeadCommitSha, GitHubIssueTitle → CamelGitHubIssueTitle. Javadoc in producer classes properly updated. Generated endpoint DSL accessor gitHubPullRequestHeadCommitSHA() correctly renamed to gitHubPullRequestHeadCommitSha(). Thorough upgrade guide entry with clear migration table.
Note: Consumer-side constants (CamelGitHubCommitAuthor, etc.) were already Camel-prefixed and remain unchanged — correctly documented in the upgrade guide.
LGTM.
Fully automatic review from Claude Code
…h Camel naming convention (apache#23454) 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>
e975e85 to
75fa69c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #23454 to
camel-4.18.x. (camel-github2does not exist oncamel-4.14.xso this is the only backport branch needed.)Cherry-pick of merge commit
3e94c446807with one adaptation: the originalPR's upgrade-guide entry was added to
camel-4x-upgrade-guide-4_21.adoc,which does not exist on the 4.18.x maintenance branch. Per the project's
backport policy the same content has been added to
camel-4x-upgrade-guide-4_18.adocinstead, with the closing NOTE rewordedbecause the deprecated
camel-githubpredecessor was only removed on the4.21 development branch — it remains present (as deprecated) on 4.18.x.
Summary
Renames the producer-side Exchange header string values in
GitHub2Constantsthat were not in the
Camelnamespace toCamelGitHub<Name>:GitHub2Constants.GITHUB_PULLREQUESTGitHubPullRequestCamelGitHubPullRequestGitHub2Constants.GITHUB_INRESPONSETOGitHubInResponseToCamelGitHubInResponseToGitHub2Constants.GITHUB_PULLREQUEST_HEAD_COMMIT_SHAGitHubPullRequestHeadCommitSHACamelGitHubPullRequestHeadCommitShaGitHub2Constants.GITHUB_ISSUE_TITLEGitHubIssueTitleCamelGitHubIssueTitleAlready-compliant constants left unchanged
The consumer-side
GITHUB_COMMIT_AUTHOR,GITHUB_COMMIT_COMMITTER,GITHUB_COMMIT_SHA,GITHUB_COMMIT_URL,GITHUB_EVENT_PAYLOADwere alreadyCamel-prefixed;GITHUB_CLIENT(github2Client) is a registry-lookup key.DSL accessor:
gitHubPullRequestHeadCommitSHA()→gitHubPullRequestHeadCommitSha()(SHA acronym casing); other accessors keep names but return the new values.
Test plan
mvn testincomponents/camel-github2on 4.18.x — 6 tests passrename described above (no merge marker shipped)
=== camel-github2 - potential breaking changeincamel-4x-upgrade-guide-4_18.adoc, before the existing camel-web3jentry
Tracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino