mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-21 19:25:46 +08:00
wip: add helper & base
This commit is contained in:
21
src/main.ts
21
src/main.ts
@@ -0,0 +1,21 @@
|
||||
import * as github from '@actions/github';
|
||||
import { dealStringToArr, THANKS } from 'actions-util';
|
||||
|
||||
import * as core from './core';
|
||||
import { TAction } from './types';
|
||||
import { IssueHelperEngine } from './helper';
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
const actions = core.getInput('actions', { required: true }) as string;
|
||||
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();
|
||||
|
Reference in New Issue
Block a user