mirror of
https://gitea.com/actions/setup-maven.git
synced 2025-11-09 02:56:20 +08:00
Husky commit correct node modules
This commit is contained in:
28
node_modules/@octokit/rest/plugins/log/index.js
generated
vendored
Normal file
28
node_modules/@octokit/rest/plugins/log/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
module.exports = octokitDebug;
|
||||
|
||||
function octokitDebug(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;
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user