Compile actions folder (#23049)

This commit is contained in:
Cheena Malhotra
2023-05-08 17:30:55 -07:00
committed by GitHub
parent 9db608d800
commit a525f3cb85
4 changed files with 51 additions and 56 deletions

View File

@@ -8,15 +8,15 @@ const core = require("@actions/core");
const github_1 = require("@actions/github");
const octokit_1 = require("../api/octokit");
const utils_1 = require("../utils/utils");
const token = (0, utils_1.getRequiredInput)('token');
const label = (0, utils_1.getRequiredInput)('label');
const token = utils_1.getRequiredInput('token');
const label = utils_1.getRequiredInput('label');
async function main() {
const pr = new octokit_1.OctoKitIssue(token, github_1.context.repo, { number: github_1.context.issue.number });
pr.addLabel(label);
}
main()
.then(() => (0, utils_1.logRateLimit)(token))
.then(() => utils_1.logRateLimit(token))
.catch(async (error) => {
core.setFailed(error.message);
await (0, utils_1.logErrorToIssue)(error.message, true, token);
await utils_1.logErrorToIssue(error.message, true, token);
});