feat: support tokens scoped to multiple repositories within organization (#46)

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
This commit is contained in:
Tim Reimherr
2023-10-04 00:28:48 -05:00
committed by GitHub
parent 5804f049e1
commit 20fd86373f
7 changed files with 949 additions and 5751 deletions

11
main.js
View File

@@ -10,15 +10,20 @@ if (!process.env.GITHUB_REPOSITORY) {
throw new Error("GITHUB_REPOSITORY missing, must be set to '<owner>/<repo>'");
}
if (!process.env.GITHUB_REPOSITORY_OWNER) {
throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'");
}
const appId = core.getInput("app_id");
const privateKey = core.getInput("private_key");
const repository = process.env.GITHUB_REPOSITORY;
const owner = core.getInput("owner");
const repositories = core.getInput("repositories");
main(
appId,
privateKey,
repository,
owner,
repositories,
core,
createAppAuth,
request.defaults({