Skip to content

Commit

Permalink
Updating README for GitHub integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
quicksketch committed Aug 4, 2016
1 parent 5a65dc0 commit d780204
Showing 1 changed file with 6 additions and 46 deletions.
52 changes: 6 additions & 46 deletions project_github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,53 +28,13 @@ Installation
configuration, but in order to be updated continuously, a webhook and
personal access token need to be set up on GitHub.

- Set up a personal access token:
- Set up GitHub web hooks:

- Visit your GitHub profile page (or better yet, set up a dedicated new
account). Edit the profile. Under the "Applications" tab click
"Generate new token". This will create a special token that can access
certain items as if it was your user account.

- Name your token something identifiable, such as "project_github_token".

- Set permissions for the token. The Project GitHub integration module only
requires access to the "public_repo" permission (and "repo" if working with
private repositories). It's recommended to use the bare minimum for
security. You can always create a new token with more permissions later.

- Generate the token. On the next page, you'll be shown the new personal
access token. Note you MUST copy it at this point. GitHub will never show
it to you again.

- Now that you have a personal access token, add this line to the bottom of
your site's settings.php file (replacing your token in the value):

$settings['project_github_access_token'] = 'e7f11ec_hash_from_github_4f6af62';

- Set up GitHub webhooks:

- Webhooks can be set up at the organization or on a per-repository basis.
You can find and create webhooks by editing the profile of an organization
or the settings of a repository on GitHub. Find the tab for "Webhooks &
Services".

- This module requires two separate webhooks set up each as follows:

- Payload URL: http://example.com/project/github/release
- Content type: application/json
- Secret: [make up a secret value and save it for later]
- Let me select individual events:
- Release

- Payload URL: http://example.com/project/github/push
- Content type: application/json
- Secret: [use the same secret value as the first hook]
- Just the push event

- Lastly, add the secret you created in your webhooks to the settings.php
file:

$settings['project_github_secret_key'] = 'secret_key_created_in_webhooks';
This module uses the [GitHub API module](https://backdropcms.org/project/githubapi)
to interact with GitHub. To set up a connection between a repository or
organization, visit the GitHub API settings page and add the owner and
repository path and click "Hook repo". This will set up necessary web hooks
on GitHub.com.

To test the entire system, create a new release on GitHub. This should
automatically create a new project node and project release node on your site.
Expand Down

0 comments on commit d780204

Please sign in to comment.