Files
issues-helper/src/main.ts
2022-02-10 17:55:52 +08:00

22 lines
584 B
TypeScript

import * as github from '@actions/github';
import { dealStringToArr, THANKS } from 'actions-util';
import * as core from './core';
import { IssueHelperEngine } from './helper';
import type { TAction } from './types';
async function main() {
try {
const actions = core.getInput('actions', { required: true });
const IHE = new IssueHelperEngine(github.context);
for (const action of dealStringToArr(actions)) {
await IHE.doExeAction(action as TAction);
}
core.baseInfo(`\n${THANKS}`);
} catch (err: any) {
core.setFailed(err.message);
}
}
main();