@@ -3077,7 +3077,7 @@ var require_dist_node7 = __commonJS({
30773077 module2.exports = __toCommonJS2(dist_src_exports);
30783078 var VERSION = "4.0.0";
30793079 var import_oauth_authorization_url = require_dist_node6();
3080- var import_request2 = require_dist_node5();
3080+ var import_request3 = require_dist_node5();
30813081 var import_request_error = require_dist_node4();
30823082 function requestToOAuthBaseUrl(request2) {
30833083 const endpointDefaults = request2.endpoint.DEFAULTS;
@@ -3110,7 +3110,7 @@ var require_dist_node7 = __commonJS({
31103110 return response;
31113111 }
31123112 function getWebFlowAuthorizationUrl({
3113- request: request2 = import_request2 .request,
3113+ request: request2 = import_request3 .request,
31143114 ...options
31153115 }) {
31163116 const baseUrl = requestToOAuthBaseUrl(request2);
@@ -3158,10 +3158,10 @@ var require_dist_node7 = __commonJS({
31583158 function toTimestamp(apiTimeInMs, expirationInSeconds) {
31593159 return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString();
31603160 }
3161- var import_request3 = require_dist_node5();
3161+ var import_request32 = require_dist_node5();
31623162 async function createDeviceCode(options) {
31633163 const request2 = options.request || /* istanbul ignore next: we always pass a custom request in tests */
3164- import_request3 .request;
3164+ import_request32 .request;
31653165 const parameters = {
31663166 client_id: options.clientId
31673167 };
@@ -3399,7 +3399,7 @@ var require_dist_node8 = __commonJS({
33993399 });
34003400 module2.exports = __toCommonJS2(dist_src_exports);
34013401 var import_universal_user_agent = require_dist_node();
3402- var import_request2 = require_dist_node5();
3402+ var import_request3 = require_dist_node5();
34033403 var import_oauth_methods = require_dist_node7();
34043404 async function getOAuthAccessToken(state, options) {
34053405 const cachedAuthentication = getCachedAuthentication(state, options.auth);
@@ -3496,7 +3496,7 @@ var require_dist_node8 = __commonJS({
34963496 }
34973497 var VERSION = "6.0.0";
34983498 function createOAuthDeviceAuth(options) {
3499- const requestWithDefaults = options.request || import_request2 .request.defaults({
3499+ const requestWithDefaults = options.request || import_request3 .request.defaults({
35003500 headers: {
35013501 "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
35023502 }
@@ -3567,7 +3567,7 @@ var require_dist_node9 = __commonJS({
35673567 });
35683568 module2.exports = __toCommonJS2(dist_src_exports);
35693569 var import_universal_user_agent = require_dist_node();
3570- var import_request2 = require_dist_node5();
3570+ var import_request3 = require_dist_node5();
35713571 var VERSION = "4.0.0";
35723572 var import_auth_oauth_device = require_dist_node8();
35733573 var import_oauth_methods = require_dist_node7();
@@ -3732,7 +3732,7 @@ var require_dist_node9 = __commonJS({
37323732 clientId,
37333733 clientSecret,
37343734 clientType = "oauth-app",
3735- request: request2 = import_request2 .request.defaults({
3735+ request: request2 = import_request3 .request.defaults({
37363736 headers: {
37373737 "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
37383738 }
@@ -3795,7 +3795,7 @@ var require_dist_node10 = __commonJS({
37953795 });
37963796 module2.exports = __toCommonJS2(dist_src_exports);
37973797 var import_universal_user_agent = require_dist_node();
3798- var import_request2 = require_dist_node5();
3798+ var import_request3 = require_dist_node5();
37993799 var import_btoa_lite = __toESM2(require_btoa_node());
38003800 var import_auth_oauth_user = require_dist_node9();
38013801 async function auth(state, authOptions) {
@@ -3865,7 +3865,7 @@ var require_dist_node10 = __commonJS({
38653865 function createOAuthAppAuth(options) {
38663866 const state = Object.assign(
38673867 {
3868- request: import_request2 .request.defaults({
3868+ request: import_request3 .request.defaults({
38693869 headers: {
38703870 "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
38713871 }
@@ -14610,7 +14610,7 @@ var require_dist_node12 = __commonJS({
1461014610 });
1461114611 module2.exports = __toCommonJS2(dist_src_exports);
1461214612 var import_universal_user_agent = require_dist_node();
14613- var import_request2 = require_dist_node5();
14613+ var import_request3 = require_dist_node5();
1461414614 var import_auth_oauth_app = require_dist_node10();
1461514615 var import_deprecation = require_dist_node3();
1461614616 var OAuthAppAuth = __toESM2(require_dist_node10());
@@ -15009,7 +15009,7 @@ var require_dist_node12 = __commonJS({
1500915009 },
1501015010 options.log
1501115011 );
15012- const request2 = options.request || import_request2 .request.defaults({
15012+ const request2 = options.request || import_request3 .request.defaults({
1501315013 headers: {
1501415014 "user-agent": `octokit-auth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`
1501515015 }
@@ -15039,17 +15039,16 @@ var require_dist_node12 = __commonJS({
1503915039});
1504015040
1504115041// main.js
15042- var import_core2 = __toESM(require_core(), 1);
15042+ var import_core = __toESM(require_core(), 1);
1504315043var import_auth_app = __toESM(require_dist_node12(), 1);
15044- var import_request = __toESM(require_dist_node5(), 1);
1504515044
1504615045// lib/main.js
15047- var import_core = __toESM(require_core(), 1);
15048- async function main(appId2, privateKey2, repository2, core3, createAppAuth2, request2) {
15046+ async function main(appId2, privateKey2, repository2, core2, createAppAuth2, request2) {
1504915047 const [owner, repo] = repository2.split("/");
1505015048 const auth = createAppAuth2({
1505115049 appId: appId2,
15052- privateKey: privateKey2
15050+ privateKey: privateKey2,
15051+ request: request2
1505315052 });
1505415053 const appAuthentication = await auth({
1505515054 type: "app"
@@ -15069,30 +15068,39 @@ async function main(appId2, privateKey2, repository2, core3, createAppAuth2, req
1506915068 installationId: installation.id,
1507015069 repositoryNames: [repo]
1507115070 });
15072- core3 .setSecret(authentication.token);
15073- core3 .setOutput("token", authentication.token);
15074- core3 .saveState("token", authentication.token);
15071+ core2 .setSecret(authentication.token);
15072+ core2 .setOutput("token", authentication.token);
15073+ core2 .saveState("token", authentication.token);
1507515074}
1507615075
15076+ // lib/request.js
15077+ var import_request = __toESM(require_dist_node5(), 1);
15078+ var request_default = import_request.request.defaults({
15079+ baseUrl: process.env["GITHUB_API_URL"],
15080+ headers: {
15081+ "user-agent": "actions/create-github-app-token"
15082+ }
15083+ });
15084+
1507715085// main.js
1507815086if (!process.env.GITHUB_REPOSITORY) {
1507915087 throw new Error("GITHUB_REPOSITORY missing, must be set to '<owner>/<repo>'");
1508015088}
15081- var appId = import_core2 .default.getInput("app_id");
15082- var privateKey = import_core2 .default.getInput("private_key");
15089+ var appId = import_core .default.getInput("app_id");
15090+ var privateKey = import_core .default.getInput("private_key");
1508315091var repository = process.env.GITHUB_REPOSITORY;
1508415092main(
1508515093 appId,
1508615094 privateKey,
1508715095 repository,
15088- import_core2 .default,
15096+ import_core .default,
1508915097 import_auth_app.createAppAuth,
15090- import_request.request .defaults({
15098+ request_default .defaults({
1509115099 baseUrl: process.env["GITHUB_API_URL"]
1509215100 })
1509315101).catch((error) => {
1509415102 console.error(error);
15095- import_core2 .default.setFailed(error.message);
15103+ import_core .default.setFailed(error.message);
1509615104});
1509715105/*! Bundled license information:
1509815106
0 commit comments