- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
@UriEndpoint(scheme="github",
syntax="github:type/branchName",
label="api,file")
public class GitHubEndpoint
extends org.apache.camel.impl.DefaultEndpoint
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