Skip to content

Commit

Permalink
fix(publisher-github): remove deprecated option from @octokit/rest pa…
Browse files Browse the repository at this point in the history
…rams (#505)

This broke with @octokit/rest.js 15.2.0.

ISSUES CLOSED: #493
  • Loading branch information
malept authored and MarshallOfSound committed May 4, 2018
1 parent 77775ea commit 8ffab0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion packages/publisher/github/src/util/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default class GitHub {

constructor(authToken: string | undefined = undefined, requireAuth: boolean = false, options: GitHubAPI.Options = {}) {
this.options = merge(
{ protocol: 'https' },
options,
{ headers: { 'user-agent': 'Electron Forge' } },
);
Expand Down
9 changes: 2 additions & 7 deletions packages/publisher/github/test/github_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,12 @@ describe('GitHub', () => {

it('should be able to set the Enterprise URL settings', () => {
const gh = new GitHub('1234', true, {
host: 'github.example.com',
port: 8443,
pathPrefix: '/enterprise',
baseUrl: 'https://github.example.com:8443/enterprise',
});
const api = gh.getGitHub();

expect((api as any).options).to.deep.equal({
protocol: 'https',
host: 'github.example.com',
port: 8443,
pathPrefix: '/enterprise',
baseUrl: 'https://github.example.com:8443/enterprise',
headers: {
'user-agent': 'Electron Forge',
},
Expand Down

0 comments on commit 8ffab0b

Please sign in to comment.