mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
fix: adjust core
This commit is contained in:
@@ -20,19 +20,9 @@ export const warning = (mess: string) => {
|
||||
core.warning(`[🎃 AC] ${mess}`);
|
||||
}
|
||||
|
||||
export const getInput = (key: string, options?: core.InputOptions): string | void => {
|
||||
core.getInput(key, options);
|
||||
}
|
||||
export const getInput = core.getInput;
|
||||
|
||||
export const setOutput = (key: string, value: string | boolean | number | object ) => {
|
||||
let formatValue: string | number | boolean | object;
|
||||
if (typeof(value) === 'object') {
|
||||
formatValue = JSON.stringify(value);
|
||||
} else {
|
||||
formatValue = value;
|
||||
}
|
||||
core.setOutput(key, formatValue);
|
||||
}
|
||||
export const setOutput = core.setOutput;
|
||||
|
||||
export const setFailed = (mess: string) => {
|
||||
core.setFailed(`[🚨 AC] ${mess}`);
|
||||
|
@@ -210,7 +210,7 @@ export async function doFindComments() {
|
||||
if (direction === 'desc') {
|
||||
comments.reverse();
|
||||
}
|
||||
core.setOutput('comments', comments);
|
||||
core.setOutput('comments', JSON.stringify(comments));
|
||||
core.info(`[doFindComments] comments --> ${JSON.stringify(comments)}`);
|
||||
} else {
|
||||
core.info(`[doFindComments] Query comments empty!`);
|
||||
@@ -244,7 +244,7 @@ export async function doFindIssues() {
|
||||
} else {
|
||||
core.info(`[doFindIssues] Query issues empty!`);
|
||||
}
|
||||
core.setOutput('issues', issues);
|
||||
core.setOutput('issues', JSON.stringify(issues));
|
||||
}
|
||||
|
||||
export async function doLockIssues(body: string, emoji?: string) {
|
||||
|
@@ -8,7 +8,7 @@ import type { TAction } from './types';
|
||||
|
||||
async function main() {
|
||||
try {
|
||||
const actions = core.getInput('actions', { required: true }) as string;
|
||||
const actions = core.getInput('actions', { required: true });
|
||||
console.log(actions)
|
||||
const IHE = new IssueHelperEngine(github.context);
|
||||
for (const action of dealStringToArr(actions)) {
|
||||
|
Reference in New Issue
Block a user