Skip to content

Commit

Permalink
#33012: Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
janssen-tiobe committed Oct 23, 2023
1 parent 731eba5 commit bff2eb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const octokitOptions = {
retryAfter: 5
}
};
exports.octokit = new (core_2.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_retry_1.retry).defaults(octokitOptions))();
exports.octokit = new (core_2.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_retry_1.retry))(octokitOptions);
exports.baseUrl = (0, api_helper_1.getTicsWebBaseUrlFromUrl)(exports.ticsConfig.ticsConfiguration);
exports.viewerUrl = exports.ticsConfig.viewerUrl ? exports.ticsConfig.viewerUrl.replace(/\/+$/, '') : exports.baseUrl;

Expand Down
2 changes: 1 addition & 1 deletion src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ const octokitOptions: OctokitOptions = {
}
};

export const octokit = new (Octokit.plugin(paginateRest, restEndpointMethods, retry).defaults(octokitOptions))();
export const octokit = new (Octokit.plugin(paginateRest, restEndpointMethods, retry))(octokitOptions);
export const baseUrl = getTicsWebBaseUrlFromUrl(ticsConfig.ticsConfiguration);
export const viewerUrl = ticsConfig.viewerUrl ? ticsConfig.viewerUrl.replace(/\/+$/, '') : baseUrl;
2 changes: 1 addition & 1 deletion test/integration/octokit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('@octokit/action (using https_proxy)', () => {
test('Should return basic REST request, but not through the proxy', async () => {
// setting no_proxy
const originalNoProxy = process.env['no_proxy'];
process.env['no_proxy'] = 'api.github.com:443';
process.env['no_proxy'] = 'api.github.com';

const branch = await octokit.rest.repos.getBranch({
owner: 'tiobe',
Expand Down

0 comments on commit bff2eb4

Please sign in to comment.