mirror of
https://github.com/github/codeql-action.git
synced 2025-12-26 17:20:10 +08:00
16 lines
453 B
JavaScript
16 lines
453 B
JavaScript
import { auth } from "./auth.js";
|
|
import { hook } from "./hook.js";
|
|
const createUnauthenticatedAuth = function createUnauthenticatedAuth2(options) {
|
|
if (!options || !options.reason) {
|
|
throw new Error(
|
|
"[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth"
|
|
);
|
|
}
|
|
return Object.assign(auth.bind(null, options.reason), {
|
|
hook: hook.bind(null, options.reason)
|
|
});
|
|
};
|
|
export {
|
|
createUnauthenticatedAuth
|
|
};
|