Fix CI
This commit is contained in:
@@ -25989,13 +25989,13 @@ var STATE_IS_POST = "isPost";
|
|||||||
async function main() {
|
async function main() {
|
||||||
core3.saveState(STATE_IS_POST, "true");
|
core3.saveState(STATE_IS_POST, "true");
|
||||||
const reposInput = core3.getInput("repos");
|
const reposInput = core3.getInput("repos");
|
||||||
const repos = reposInput ? reposInput.split(",").map((r) => r.trim()).filter(Boolean) : void 0;
|
const additionalRepos = reposInput ? reposInput.split(",").map((r) => r.trim()).filter(Boolean) : [];
|
||||||
const token = await acquireInstallationToken({ repos });
|
const token = await acquireInstallationToken({ repos: additionalRepos });
|
||||||
core3.setSecret(token);
|
core3.setSecret(token);
|
||||||
core3.saveState(STATE_TOKEN, token);
|
core3.saveState(STATE_TOKEN, token);
|
||||||
core3.setOutput("token", token);
|
core3.setOutput("token", token);
|
||||||
const scope = repos?.length ? `current repo + ${repos.join(", ")}` : "current repo only";
|
const scope = additionalRepos.length ? `current repo + ${additionalRepos.join(", ")}` : "current repo only";
|
||||||
core3.info(`installation token acquired successfully (${scope})`);
|
core3.info(`\xBB installation token acquired (${scope})`);
|
||||||
}
|
}
|
||||||
async function post() {
|
async function post() {
|
||||||
const token = core3.getState(STATE_TOKEN);
|
const token = core3.getState(STATE_TOKEN);
|
||||||
@@ -26004,7 +26004,7 @@ async function post() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await revokeInstallationToken(token);
|
await revokeInstallationToken(token);
|
||||||
core3.info("installation token revoked successfully");
|
core3.info("\xBB installation token revoked");
|
||||||
}
|
}
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -15,11 +15,14 @@ async function main(): Promise<void> {
|
|||||||
core.saveState(STATE_IS_POST, "true");
|
core.saveState(STATE_IS_POST, "true");
|
||||||
|
|
||||||
const reposInput = core.getInput("repos");
|
const reposInput = core.getInput("repos");
|
||||||
const repos = reposInput
|
const additionalRepos = reposInput
|
||||||
? reposInput.split(",").map((r) => r.trim()).filter(Boolean)
|
? reposInput
|
||||||
: undefined;
|
.split(",")
|
||||||
|
.map((r) => r.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
: [];
|
||||||
|
|
||||||
const token = await acquireInstallationToken({ repos });
|
const token = await acquireInstallationToken({ repos: additionalRepos });
|
||||||
|
|
||||||
// mask the token in logs
|
// mask the token in logs
|
||||||
core.setSecret(token);
|
core.setSecret(token);
|
||||||
@@ -30,10 +33,10 @@ async function main(): Promise<void> {
|
|||||||
// set as output
|
// set as output
|
||||||
core.setOutput("token", token);
|
core.setOutput("token", token);
|
||||||
|
|
||||||
const scope = repos?.length
|
const scope = additionalRepos.length
|
||||||
? `current repo + ${repos.join(", ")}`
|
? `current repo + ${additionalRepos.join(", ")}`
|
||||||
: "current repo only";
|
: "current repo only";
|
||||||
core.info(`installation token acquired successfully (${scope})`);
|
core.info(`» installation token acquired (${scope})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function post(): Promise<void> {
|
async function post(): Promise<void> {
|
||||||
@@ -45,7 +48,7 @@ async function post(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await revokeInstallationToken(token);
|
await revokeInstallationToken(token);
|
||||||
core.info("installation token revoked successfully");
|
core.info("» installation token revoked");
|
||||||
}
|
}
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user