Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from target/fix-host-issue
Browse files Browse the repository at this point in the history
fix: Github Host Confusion
  • Loading branch information
remoz authored Aug 21, 2018
2 parents e2a9955 + c9dca10 commit f2710df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ my-release-log-step:
- `github_tag_id` - you can use this as regex to match on specific tags.
- `slack_channel`/`SLACK_URL` - when using the API, you should use `slack_channel` to specify which room you'd like to post to. When using `SLACK_URL` you should not specify the room (i.e. `slack_channel`) because the room is already a part of the webhook. ([Setting Up A Webhook (e.g. SLACK_URL)](https://api.slack.com/incoming-webhooks), [Setting Up A Slack Token](https://api.slack.com/docs/token-types#verification))
- `teams` - a list of teams which allows you to organize the output of Captains Log into meaningful chunks. (more below)
- `enterprise_host` - if you use Enterprise Github, this is where you would supply the custom domain. (e.g. https://git.myCompany.com)
- `enterprise_host` - if you use Enterprise Github, this is where you would supply the custom domain. (e.g. https://git.myCompany.com, `/api/v3` will be appended to this **do not include it for this value**).

**Example of `github_tag_id`**

Expand Down
7 changes: 2 additions & 5 deletions src/connectors/GithubConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ const Github = require('@octokit/rest');
const config = require('../config');

const {
domain,
host,
timeout,
token,
domain, host, timeout, token,
} = config.get('github');

const accepts = [
Expand All @@ -23,7 +20,7 @@ const github = new Github({
accept: accepts.join(','),
'user-agent': 'octokit/rest v15.8.1',
},
baseUrl: domain || host,
baseUrl: `${domain}/api/v3` || host,
});

github.authenticate({
Expand Down

0 comments on commit f2710df

Please sign in to comment.