GitHub

GitHub

Scheme: github
Syntax: github:type/branchName
Description: The github component is used for integrating Camel with github.
Deprecated:false
Async:false
Maven: org.apache.camel/camel-github/2.18.1.redhat-000025

The github component is used for integrating Camel with github. The endpoint encapsulates portions of the GitHub API, relying on the org.eclipse.egit.github.core Java SDK. Available endpoint URIs include: CONSUMERS github://pullRequest (new pull requests) github://pullRequestComment (new pull request comments) github://commit/[branch] (new commits) github://tag (new tags) PRODUCERS github://pullRequestComment (create a new pull request comment; see PullRequestCommentProducer for header requirements) The endpoints will respond with org.eclipse.egit.github.core-provided POJOs (PullRequest, CommitComment, RepositoryTag, RepositoryCommit, etc.) Note: Rather than webhooks, this endpoint relies on simple polling. Reasons include: - concerned about reliability/stability if this somehow relied on an exposed, embedded server (Jetty?) - the types of payloads we're polling aren't typically large (plus, paging is available in the API) - need to support apps running somewhere not publicly accessible where a webhook would fail

Name Kind Group Required Default Type Enum Description
type path common true org.apache.camel.component.github.GitHubType CLOSEPULLREQUEST
PULLREQUESTCOMMENT
COMMIT
PULLREQUEST
TAG
PULLREQUESTSTATE
PULLREQUESTFILES
GETCOMMITFILE
CREATEISSUE
What git operation to execute
branchName path consumer java.lang.String Name of branch
oauthToken parameter common java.lang.String GitHub OAuth token, required unless username & password are provided
password parameter common java.lang.String GitHub password, required unless oauthToken is provided
repoName parameter common true java.lang.String GitHub repository name
repoOwner parameter common true java.lang.String GitHub repository owner (organization)
username parameter common java.lang.String GitHub username, required unless oauthToken is provided
bridgeErrorHandler parameter consumer boolean 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 message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exceptionHandler parameter consumer (advanced) org.apache.camel.spi.ExceptionHandler To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exchangePattern parameter consumer (advanced) org.apache.camel.ExchangePattern InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the exchange pattern when the consumer creates an exchange.
encoding parameter producer java.lang.String To use the given encoding when getting a git commit file
state parameter producer java.lang.String error
failure
pending
success
To set git commit status state
targetUrl parameter producer java.lang.String To set git commit status target url
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).