Skip to content

[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
apache:camel-4.18.xfrom
oscerd:backport/23454-to-camel-4.18.x
Open

[backport camel-4.18.x] CAMEL-23582: camel-github2 - align Exchange header constant names with Camel naming convention#23537
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/23454-to-camel-4.18.x

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 26, 2026

Backports #23454 to camel-4.18.x. (camel-github2 does not exist on
camel-4.14.x so this is the only backport branch needed.)

Cherry-pick of merge commit 3e94c446807 with one adaptation: the original
PR'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.adoc instead, with the closing NOTE reworded
because the deprecated camel-github predecessor was only removed on the
4.21 development branch — it remains present (as deprecated) on 4.18.x.

Summary

Renames the producer-side Exchange header string values in GitHub2Constants
that were not in the Camel namespace to CamelGitHub<Name>:

Constant Previous value New value
GitHub2Constants.GITHUB_PULLREQUEST GitHubPullRequest CamelGitHubPullRequest
GitHub2Constants.GITHUB_INRESPONSETO GitHubInResponseTo CamelGitHubInResponseTo
GitHub2Constants.GITHUB_PULLREQUEST_HEAD_COMMIT_SHA GitHubPullRequestHeadCommitSHA CamelGitHubPullRequestHeadCommitSha
GitHub2Constants.GITHUB_ISSUE_TITLE GitHubIssueTitle CamelGitHubIssueTitle

Already-compliant constants left unchanged

The consumer-side GITHUB_COMMIT_AUTHOR, GITHUB_COMMIT_COMMITTER,
GITHUB_COMMIT_SHA, GITHUB_COMMIT_URL, GITHUB_EVENT_PAYLOAD were already
Camel-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 test in components/camel-github2 on 4.18.x — 6 tests pass
  • Cherry-pick applied cleanly except for the 4_21 → 4_18 guide-file
    rename described above (no merge marker shipped)
  • Upgrade-guide entry added under
    === camel-github2 - potential breaking change in
    camel-4x-upgrade-guide-4_18.adoc, before the existing camel-web3j
    entry

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean header rename backport for camel-github2 to 4.18.x. Renames GitHubPullRequestCamelGitHubPullRequest, GitHubInResponseToCamelGitHubInResponseTo, GitHubPullRequestHeadCommitSHACamelGitHubPullRequestHeadCommitSha, GitHubIssueTitleCamelGitHubIssueTitle. 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>
@oscerd oscerd force-pushed the backport/23454-to-camel-4.18.x branch from e975e85 to 75fa69c Compare May 27, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants