mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-06-29 14:46:03 +00:00
node_modules
This commit is contained in:
parent
5e3f23f92c
commit
806116bda4
734 changed files with 224451 additions and 0 deletions
31
node_modules/@octokit/rest/plugins/authentication-deprecated/index.js
generated
vendored
Normal file
31
node_modules/@octokit/rest/plugins/authentication-deprecated/index.js
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
module.exports = authenticationPlugin;
|
||||
|
||||
const { Deprecation } = require("deprecation");
|
||||
const once = require("once");
|
||||
|
||||
const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation));
|
||||
|
||||
const authenticate = require("./authenticate");
|
||||
const beforeRequest = require("./before-request");
|
||||
const requestError = require("./request-error");
|
||||
|
||||
function authenticationPlugin(octokit, options) {
|
||||
if (options.auth) {
|
||||
octokit.authenticate = () => {
|
||||
deprecateAuthenticate(
|
||||
octokit.log,
|
||||
new Deprecation(
|
||||
'[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor'
|
||||
)
|
||||
);
|
||||
};
|
||||
return;
|
||||
}
|
||||
const state = {
|
||||
octokit,
|
||||
auth: false
|
||||
};
|
||||
octokit.authenticate = authenticate.bind(null, state);
|
||||
octokit.hook.before("request", beforeRequest.bind(null, state));
|
||||
octokit.hook.error("request", requestError.bind(null, state));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue