Skip to content

Commit

Permalink
auth: use map
Browse files Browse the repository at this point in the history
  • Loading branch information
edganiukov committed Dec 11, 2023
1 parent b1a430f commit eff28cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43074,12 +43074,12 @@ function jsonifyInput() {
let authorized = false;
const authorizedUsers = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("authorized-users");
if (Boolean(authorizedUsers)) {
config.authorized_github_users = authorizedUsers.split(",").filter((u) => String(u).trim());
config.authorized_github_users = authorizedUsers.split(",").map((u) => String(u).trim());
authorized = true;
}
const authorizedKeys = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("authorized-keys");
if (Boolean(authorizedKeys)) {
config.authorized_keys = authorizedKeys.split(",").filter((k) => String(k).trim());
config.authorized_keys = authorizedKeys.split(",").map((k) => String(k).trim());
authorized = true;
}
if (!authorized) {
Expand Down
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ function jsonifyInput(): string {
let authorized: Boolean = false;
const authorizedUsers: string = core.getInput("authorized-users");
if (Boolean(authorizedUsers)) {
config.authorized_github_users = authorizedUsers.split(",").filter((u) => String(u).trim());
config.authorized_github_users = authorizedUsers.split(",").map((u) => String(u).trim());
authorized = true;
}

const authorizedKeys: string = core.getInput("authorized-keys");
if (Boolean(authorizedKeys)) {
config.authorized_keys = authorizedKeys.split(",").filter((k) => String(k).trim());
config.authorized_keys = authorizedKeys.split(",").map((k) => String(k).trim());
authorized = true;
}

Expand Down

0 comments on commit eff28cd

Please sign in to comment.