mirror of
https://github.com/actions/labeler.git
synced 2025-12-16 23:23:03 +00:00
Bump actions/github to 2.2.0 to support GHES (#72)
* Bumping actions/github to 2.2.0 * Husky commit correct node modules
This commit is contained in:
28
node_modules/@octokit/plugin-request-log/dist-web/index.js
generated
vendored
Normal file
28
node_modules/@octokit/plugin-request-log/dist-web/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
const VERSION = "1.0.0";
|
||||
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
*/
|
||||
function requestLog(octokit) {
|
||||
octokit.hook.wrap("request", (request, options) => {
|
||||
octokit.log.debug("request", options);
|
||||
const start = Date.now();
|
||||
const requestOptions = octokit.request.endpoint.parse(options);
|
||||
const path = requestOptions.url.replace(options.baseUrl, "");
|
||||
return request(options)
|
||||
.then(response => {
|
||||
octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
|
||||
return response;
|
||||
})
|
||||
.catch(error => {
|
||||
octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() -
|
||||
start}ms`);
|
||||
throw error;
|
||||
});
|
||||
});
|
||||
}
|
||||
requestLog.VERSION = VERSION;
|
||||
|
||||
export { requestLog };
|
||||
//# sourceMappingURL=index.js.map
|
||||
Reference in New Issue
Block a user