GitHub

The source GitHub connector will sync files committed to a repository. This requires a GitHub webhook setup for the repository. In addition, a file must be part of the commit to the repository to be sent in the webhook payload and synced through Impulse.

Configuration walkthrough

Specifics

GitHub Webhooks

To connect and get data from GitHub you will need to set up a webhook from GitHub.

In your GitHub repository: Settings → Webhooks → Add webhook

The structure of the webhook is as follows.

  • Payload URL:

    • You need the job-id in order to set up the GitHub Webhook Payload URL

      • http://{{impulse-server}}/public/github-webhook-listener/webhook/{{impulse-job-id}}

Note: If running locally you will need to set up ngrok.

  • Content type: application/json

  • Secret: <same secret used in endpoint config>

Example

The configuration should look as the image below where we must use in the Payload URL our tunnel HTTP URL (for this example http://644bd25536a6.ngrok.io/webhook/65968c46-e849-4223-bbb8-b538b2d21056) and for the Secret we need to use the one we save in our configuration for the endpoint.

Starting a Sync

To start a sync from GitHub, you will need to make a commit. You can add a new folder, change a text file, etc. That commit will fire the webhook and start the job. Pushing content into the repository will trigger a PUSH event sending the pushed element through Impulse to diesel and the destinations.

You can view if the initial start of the job was successful by viewing the webhook recent deliveries page:

Endpoint Config

When saving an endpoint for a GitHub repository via REST instead of the UI you must use the following key:value pairs in the payload.

  • contentRepo:github

  • contentRepoVersion:latest

Unsupported

Syncing a repository without a commit. To sync repository files, you must commit the files you want to sync.

GitHub adapter does not support running as a remote adapter apart from Impulse.

Adapter Properties

PropertyPurposeRequired

organization

The GitHub organization to pickup files from.

true

repo

The GitHub repository to pickup files from.

true

oAuthKey

The oAuth key associated with repository to access the repo and files.

false

secretKey

The secret key setup for the GitHub repo's webhook.

false

Job Options

The GitHub source connector has no job options.

Motation Object Support

ObjectSupported

Category

No

Definition

Yes

Domain

No

Folder

Yes

Language

No

Relationship

No

Tag

No

Last updated