# GitHub

{% hint style="info" %}
This page applies to the **Business** and **Enterprise** plans.  [👉 Compare all plans](https://www.meeds.io/pricing)
{% endhint %}

If your organization uses [GitHub](https://github.com) to manage code or documentation and wants to foster open contributions and collaboration, the GitHub connector for Meeds is for you!

You can activate it to allow contributors to earn points by interacting with your repositories.

Events that the GitHub connector can capture include:

* Issues
* Pull Requests
* Code

To start configuring the GitHub connector for Meeds go to *Administration > Recognition > Connectors > GitHub*

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FZJMXJmM9lfDSsqqSJhzd%2FGitHub-connectors-list.png?alt=media&#x26;token=357d9650-b111-4ac4-b494-818928612e73" alt="" width="563"><figcaption><p>GitHub connector card</p></figcaption></figure>

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FDlXT2ccdGUQGTAUuxnkc%2FGitHub-connector-home.png?alt=media&#x26;token=db8f83bf-c7fd-4fa3-abcf-30c5a25dae8c" alt="" width="563"><figcaption><p>List of events of the GitHub connector</p></figcaption></figure>

Next, Click `Configure`&#x20;

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FSEAtaMZbR1RtjgvOvLdj%2FGitHub-connector-config.png?alt=media&#x26;token=7a144abf-9f87-4605-a19d-c5a0e8357843" alt="" width="563"><figcaption><p>GitHub configuration</p></figcaption></figure>

## :point\_right: **Allow users to connect their GitHub account**

Click on *`Allow connection` and* follow the instructions in the form:&#x20;

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FeIUgYvlPLRI4ZOCfr9HJ%2FGitHub-connector-profile1.png?alt=media&#x26;token=6b1105ad-ac1e-48d1-894c-7647f33dd57b" alt="" width="375"><figcaption><p>Connect GitHub profile config 1/3</p></figcaption></figure>

**Step 1:** Go to your [Developer Settings](https://github.com/settings/apps) in your GitHub account

Click on *OAuthApps >* `Register new application`

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FkNQ7JiYakWnRDpeZ2w3X%2FGitHub-oauth-new-app.png?alt=media&#x26;token=2c735cba-9121-4a00-b579-36944e806e81" alt="" width="563"><figcaption><p>OAuth Apps tab in GitHub's Developer Settings</p></figcaption></figure>

Fill in the *Application name* and *description*,

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FSOIlYyrXHgKj2awjWxy9%2FgitHub-oauth-new-app2.png?alt=media&#x26;token=ea5847ec-db57-4603-a9c0-07433e3b12d9" alt="" width="375"><figcaption><p>OAuth app form in GitHub</p></figcaption></figure>

&#x20;Now head back to Meeds to retrieve the URLs

**Step 2:** Click `Next` and copy the *Homepage URL* and *Authorization callback URL* from Meeds

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FMlM4oGo8DfMR8TkCbYNi%2FGitHub-connector-profile2.png?alt=media&#x26;token=9e8d6218-1611-462d-a79f-faf8458cb653" alt="" width="375"><figcaption><p>oAuth apps URLs in Meeds</p></figcaption></figure>

Now paste the URLs into the oAuth application form on GitHub and create the app.

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2F5S2l82C01pjwE8XxAEoU%2FGitHub-oauth-app-credentials.png?alt=media&#x26;token=25f45205-1970-4d61-8f05-5f09b2af703a" alt="" width="563"><figcaption><p>Client ID in GitHub</p></figcaption></figure>

Click on `Generate a new client secret` and authenticate

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2F6B7XcEEy8Iv3fk9eo4UH%2FGitHub-oauth-app-secret.png?alt=media&#x26;token=9c5c6881-5dba-4aaa-a7a6-001f279536cd" alt="" width="563"><figcaption><p>Client secret in GitHub</p></figcaption></figure>

Head back to Meeds

**Step 2:** Click `Next` and copy-paste the *Client ID* and *Client secret* from GitHub to Meeds&#x20;

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2Frnx8zcwc9s4eTq5ZwHy6%2FGitHub-connector-profile3.png?alt=media&#x26;token=94dae03f-8567-486a-96ed-b2ddc08071ae" alt="" width="375"><figcaption><p>Connect GitHub profile config 3/3</p></figcaption></figure>

Click `Save`

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FffzVX496xGuTsRtuWj1R%2FGitHub-connector-profile4.png?alt=media&#x26;token=0aceb686-11d7-4305-adaf-64ad92568ad5" alt="" width="563"><figcaption><p>Connect GitHub profile configured in Meeds</p></figcaption></figure>

You can click on the <img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FldWgltz67X5RUxd1VmlL%2Ftoggle.png?alt=media&#x26;token=b89d21c1-040f-4d83-8df1-0dd1d8e2760d" alt="" data-size="line">toggle button to temporarily disable profile connections, or you can ✏️ *Edit* or 🗑️ *Delete* the configuration to start over.

At this stage, your users can [connect their GitHub profile](https://docs.meeds.io/meeds-guides/user-guide/setting-up-your-account/linking-your-accounts/github).

## :point\_right: **Add a GitHub organization to watch**

Now, you must add one or more organizations that Meeds will watch to track events your contributors perform.

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FW5tJIBduw6PlboHz0zxd%2FGitHub-connector-organization1.png?alt=media&#x26;token=14c9a2f3-decd-4c26-a807-58c3ddc6b08e" alt="" width="563"><figcaption><p>Connect GitHub organizations to watch</p></figcaption></figure>

Click on `Add Organization`

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FxM2h8sbeNYLheTD100kJ%2FGitHub-connector-organization2.png?alt=media&#x26;token=57c29f51-d7ee-4160-93d9-e15d809635f2" alt="" width="375"><figcaption><p>Personal access token field in Meeds</p></figcaption></figure>

On GitHub, head back to your [Developer Settings ](https://github.com/settings/developers)*> Personal access tokens (classic)*

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FVXyjg7trUMsl3fLmdE8i%2FGitHub-personal-access-token.png?alt=media&#x26;token=8e857974-994c-4654-87c9-8b94340d7db6" alt="" width="563"><figcaption><p>Personal acess tokens in GitHub</p></figcaption></figure>

Click *Generate new token >* `Personal access token (classic)`

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2F0pnmkAggFspMZ9EUBdda%2FGitHub-personal-access-token-form.png?alt=media&#x26;token=55713819-1e3d-4698-ba51-3bc2f3c5f000" alt="" width="563"><figcaption><p>Personal access token form in GitHub</p></figcaption></figure>

Fill out the form by selecting scopes :

* `repo`
* `admin:org_hook`

Then click the `Generate token` button

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FVTtd3XjAaC0KjXgIrpCg%2FGitHub-personal-access-token-copy.png?alt=media&#x26;token=cb6729f2-aaf0-41a0-94c8-8bd9d5b55e32" alt="" width="563"><figcaption><p>Copy the personal access token in GitHub</p></figcaption></figure>

Copy the token and head back to Meeds to paste it, then click the ✅ checkmark to validate.

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2Fhc5vlFzEkfB1UwHsQCr9%2FGitHub-connector-organization3.png?alt=media&#x26;token=16a5294f-ad1c-4e07-855c-5a410ad68c26" alt="" width="375"><figcaption><p>Paste the personal access token in Meeds</p></figcaption></figure>

Click `Next` and enter your GitHub organization name.

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FEOLMUjB2AhStIcBeNeYG%2FGitHub-connector-organization4.png?alt=media&#x26;token=944a9d66-323e-42b5-8ce9-743edd3348a9" alt="" width="375"><figcaption><p>Enter GitHub organization name</p></figcaption></figure>

Click `Save`*,* and the organization should be listed:

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FESplle72NtARtvTLcawj%2FGitHub-connector-organizations-list.png?alt=media&#x26;token=eab5a18d-9f47-4a29-942b-ef3b824874ab" alt="" width="563"><figcaption></figcaption></figure>

You may add  ➕  more organizations to watch, ✏️ Edit, or 🗑️ Delete to start over

Click on the organization's name

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FSwUSv56aR6wloJf1FeVm%2FGitHub)connector-org-events.png?alt=media&#x26;token=dcacfa3e-2c3d-443c-9c9e-162b80203eaf" alt="" width="563"><figcaption><p>List of events enabled for an organizaton</p></figcaption></figure>

In the *Events* tab, you may restrict what events to watch for that particular organization.

Click on *Repositories*&#x20;

<figure><img src="https://3823946396-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1i2FMkbhfl9LXQQfUyES%2Fuploads%2FBp4QomjbzBdP2oCnOl1M%2FGitHub-connector-org-repos.png?alt=media&#x26;token=b625fdc5-7a43-4fdb-ba72-1c0091adf6e7" alt="" width="563"><figcaption><p>List of repositories to watch</p></figcaption></figure>

From there, you can restrict which repositories to watch on that particular organization.

**🎉 Congratulations! Your Meeds Hub is now ready to incentivize contributions on GitHub! Your program owner can now start designing incentives to** [**Foster open collaboration on GitHub**](https://docs.meeds.io/meeds-guides/admin-guide/designing-incentives/fostering-open-collaboration-on-github)**.**
