Skip to content

Commit 4b0802d

Browse files
committed
Update README.md for API key
1 parent 35be5a7 commit 4b0802d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ That approach works perfectly fine, but is a bit heavy-handed and cumbersome. Th
1919
`gem "redmine_github_hook"`
2020
2. `bundle`
2121
3. Restart your Redmine
22+
4. Enable **Enable WS for repository management** in **Administration** > **Settings** > **Repositories** and generate an API key
2223

2324
### 2. Add the repository to Redmine
2425

@@ -32,9 +33,9 @@ Adding a Git repository to a project (note, this should work whether you want to
3233
1. Go to the repository Settings interface on GitHub.
3334
2. Under "Webhooks & Services" add a new "WebHook". The "Payload URL" needs to be of the format: `[redmine_url]/github_hook` (for example `http://redmine.example.com/github_hook`).
3435
* By default, GitHub Hook assumes your GitHub repository name is the same as the *project identifier* in your Redmine installation.
35-
* If this is not the case, you can specify the actual Redmine project identifier in the Post-Receive URL by using the format `[redmine_url]/github_hook?project_id=[identifier]` (for example `http://redmine.example.com/github_hook?project_id=my_project`).
36+
* If this is not the case, you can specify the actual Redmine project identifier in the Post-Receive URL by using the format `[redmine_url]/github_hook?key=[api_key]&project_id=[identifier]` (for example `http://redmine.example.com/github_hook?key=my_api_key&project_id=my_project`).
3637
* GitHub Hook will then update **all repositories** in the specified project. *Be aware, that this process may take a while if you have many repositories in your project.*
37-
* If you want GitHub Hook to **only update the current repository** you can specify it with an additional parameter in the Post-Receive URL by using the format `[redmine_url]/github_hook?project_id=[identifier]&repository_id=[repository]` (for example `http://redmine.example.com/github_hook?project_id=my_project&repository_id=my_repo`).
38+
* If you want GitHub Hook to **only update the current repository** you can specify it with an additional parameter in the Post-Receive URL by using the format `[redmine_url]/github_hook?key=[api_key]&project_id=[identifier]&repository_id=[repository]` (for example `http://redmine.example.com/github_hook?key=my_api_key&project_id=my_project&repository_id=my_repo`).
3839
* In most cases, just having the "push" event trigger the webhook should suffice, but you are free to customize the events as you desire.
3940
* *Note: Make sure you're adding a Webhook - which is what Redmine Github Hook expects. GitHub has some builtin Redmine integration; that's not what you're looking for.*
4041

0 commit comments

Comments
 (0)