Skip to content

CAMEL-23582: camel-github2 - align Exchange header constant names with Camel naming convention#23454

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23582
May 22, 2026
Merged

CAMEL-23582: camel-github2 - align Exchange header constant names with Camel naming convention#23454
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23582

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 22, 2026

Summary

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.

Scope note: camel-github removed

CAMEL-23582 originally scoped both camel-github and camel-github2. The
deprecated camel-github component was removed in Camel 4.21 (commit
2eec2f35fae "Remove camel-github component") before this rename could be
applied, so only camel-github2 is addressed here.

Already-compliant constants left unchanged

  • The consumer-side constants (GITHUB_COMMIT_AUTHOR, GITHUB_COMMIT_COMMITTER,
    GITHUB_COMMIT_SHA, GITHUB_COMMIT_URL, GITHUB_EVENT_PAYLOAD) were already
    Camel-prefixed (CamelGitHubCommitAuthor, etc.).
  • GITHUB_CLIENT (github2Client) is a registry-lookup key, not an Exchange
    header, and is unchanged.

Generated artifacts

  • components/camel-github2/.../github2.json + catalog mirror
  • dsl/camel-endpointdsl/.../GitHub2EndpointBuilderFactory.java — the
    gitHubPullRequestHeadCommitSHA() accessor is renamed to
    gitHubPullRequestHeadCommitSha() (SHA acronym casing); the other accessors
    keep their names but return the new Camel-prefixed values.

Backports

  • camel-4.18.x: camel-github2 exists with the same legacy values — backport
    applies. Will be filed as a follow-up PR.
  • camel-4.14.x: camel-github2 does not exist on that branch — no
    backport.

Test plan

  • mvn test in components/camel-github2 — passes
  • Module + catalog + endpointdsl built cleanly; only camel-github2 regen
    artifacts included
  • Producer Javadocs quoting the header names updated to the new values
  • Upgrade guide entry added under === camel-github2, cross-referencing
    the camel-github removal

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd requested review from davsclaus and gnodet May 22, 2026 07:45
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

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.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-github2
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: GitHub2
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants