refactor: rename internal appId variable to clientId
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Vendored
+5
-5
@@ -23153,7 +23153,7 @@ async function pRetry(input, options = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// lib/main.js
|
// lib/main.js
|
||||||
async function main(appId, privateKey, owner, repositories, permissions, core, createAppAuth2, request2, skipTokenRevoke) {
|
async function main(clientId, privateKey, owner, repositories, permissions, core, createAppAuth2, request2, skipTokenRevoke) {
|
||||||
let parsedOwner = "";
|
let parsedOwner = "";
|
||||||
let parsedRepositoryNames = [];
|
let parsedRepositoryNames = [];
|
||||||
if (!owner && repositories.length === 0) {
|
if (!owner && repositories.length === 0) {
|
||||||
@@ -23188,7 +23188,7 @@ async function main(appId, privateKey, owner, repositories, permissions, core, c
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
const auth5 = createAppAuth2({
|
const auth5 = createAppAuth2({
|
||||||
appId,
|
appId: clientId,
|
||||||
privateKey,
|
privateKey,
|
||||||
request: request2
|
request: request2
|
||||||
});
|
});
|
||||||
@@ -23307,8 +23307,8 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
|
|||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
ensureNativeProxySupport();
|
ensureNativeProxySupport();
|
||||||
const appId = getInput("client-id") || getInput("app-id");
|
const clientId = getInput("client-id") || getInput("app-id");
|
||||||
if (!appId) {
|
if (!clientId) {
|
||||||
throw new Error("Either 'client-id' or 'app-id' input must be set");
|
throw new Error("Either 'client-id' or 'app-id' input must be set");
|
||||||
}
|
}
|
||||||
const privateKey = getInput("private-key");
|
const privateKey = getInput("private-key");
|
||||||
@@ -23317,7 +23317,7 @@ async function run() {
|
|||||||
const skipTokenRevoke = getBooleanInput("skip-token-revoke");
|
const skipTokenRevoke = getBooleanInput("skip-token-revoke");
|
||||||
const permissions = getPermissionsFromInputs(process.env);
|
const permissions = getPermissionsFromInputs(process.env);
|
||||||
return main(
|
return main(
|
||||||
appId,
|
clientId,
|
||||||
privateKey,
|
privateKey,
|
||||||
owner,
|
owner,
|
||||||
repositories,
|
repositories,
|
||||||
|
|||||||
+3
-3
@@ -2,7 +2,7 @@ import pRetry from "p-retry";
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} appId
|
* @param {string} clientId
|
||||||
* @param {string} privateKey
|
* @param {string} privateKey
|
||||||
* @param {string} owner
|
* @param {string} owner
|
||||||
* @param {string[]} repositories
|
* @param {string[]} repositories
|
||||||
@@ -13,7 +13,7 @@ import pRetry from "p-retry";
|
|||||||
* @param {boolean} skipTokenRevoke
|
* @param {boolean} skipTokenRevoke
|
||||||
*/
|
*/
|
||||||
export async function main(
|
export async function main(
|
||||||
appId,
|
clientId,
|
||||||
privateKey,
|
privateKey,
|
||||||
owner,
|
owner,
|
||||||
repositories,
|
repositories,
|
||||||
@@ -70,7 +70,7 @@ export async function main(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auth = createAppAuth({
|
const auth = createAppAuth({
|
||||||
appId,
|
appId: clientId,
|
||||||
privateKey,
|
privateKey,
|
||||||
request,
|
request,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
|
|||||||
async function run() {
|
async function run() {
|
||||||
ensureNativeProxySupport();
|
ensureNativeProxySupport();
|
||||||
|
|
||||||
const appId = core.getInput("client-id") || core.getInput("app-id");
|
const clientId = core.getInput("client-id") || core.getInput("app-id");
|
||||||
if (!appId) {
|
if (!clientId) {
|
||||||
throw new Error("Either 'client-id' or 'app-id' input must be set");
|
throw new Error("Either 'client-id' or 'app-id' input must be set");
|
||||||
}
|
}
|
||||||
const privateKey = core.getInput("private-key");
|
const privateKey = core.getInput("private-key");
|
||||||
@@ -35,7 +35,7 @@ async function run() {
|
|||||||
const permissions = getPermissionsFromInputs(process.env);
|
const permissions = getPermissionsFromInputs(process.env);
|
||||||
|
|
||||||
return main(
|
return main(
|
||||||
appId,
|
clientId,
|
||||||
privateKey,
|
privateKey,
|
||||||
owner,
|
owner,
|
||||||
repositories,
|
repositories,
|
||||||
|
|||||||
Reference in New Issue
Block a user