Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 committed Jan 18, 2025
1 parent de1e80c commit bb648ed
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
26 changes: 13 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29928,7 +29928,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run;
const node_fs_1 = __nccwpck_require__(3024);
const node_path_1 = __nccwpck_require__(6760);
const node_process_1 = __importDefault(__nccwpck_require__(1708));
const core_1 = __nccwpck_require__(9999);
const github_1 = __nccwpck_require__(2819);
const utils_1 = __nccwpck_require__(6236);
Expand All @@ -29939,7 +29938,7 @@ function run() {
const repo = (0, core_1.getInput)('repo') || github_1.context.repo.repo;
const owner = (0, core_1.getInput)('owner') || github_1.context.repo.owner;
const pr_number = (0, core_1.getInput)('pr_number') || github_1.context.issue.number;
const token = (0, core_1.getInput)('token') || node_process_1.default.env.GITHUB_TOKEN || '';
const token = (0, core_1.getInput)('token') || '';
const trigger = (0, core_1.getInput)('trigger') || ((_a = github_1.context.payload.comment) === null || _a === void 0 ? void 0 : _a.body) || '';
(0, core_1.info)(`context:${JSON.stringify(github_1.context, null, 2)}`);
if (github_1.context.eventName === 'issue_comment' && github_1.context.payload.pull_request) {
Expand Down Expand Up @@ -30439,6 +30438,15 @@ function useGithub(context) {

"use strict";

var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Expand Down Expand Up @@ -30477,9 +30485,9 @@ exports.ownerMap = {
};
function useTrigger(context) {
const triggerRun = {
'tdesign-icons': () => (0, icons_1.default)(context),
'tdesign-common': () => (0, common_1.default)(context),
'tdesign-vue': () => (0, vue_1.default)(context),
'tdesign-icons': () => __awaiter(this, void 0, void 0, function* () { return yield (0, icons_1.default)(context); }),
'tdesign-common': () => __awaiter(this, void 0, void 0, function* () { return yield (0, common_1.default)(context); }),
'tdesign-vue': () => __awaiter(this, void 0, void 0, function* () { return yield (0, vue_1.default)(context); }),
};
if (!Reflect.has(triggerRun, context.repo)) {
(0, core_1.error)(`${context.repo} 未适配`);
Expand Down Expand Up @@ -30618,14 +30626,6 @@ module.exports = require("node:path");

/***/ }),

/***/ 1708:
/***/ ((module) => {

"use strict";
module.exports = require("node:process");

/***/ }),

/***/ 7075:
/***/ ((module) => {

Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import process from 'node:process'
import { getInput, info } from '@actions/core'
import { context } from '@actions/github'
import { setGitConfig } from './utils'
Expand All @@ -10,7 +9,7 @@ export async function run(): Promise<void> {
const repo = getInput('repo') || context.repo.repo
const owner = getInput('owner') || context.repo.owner
const pr_number = getInput('pr_number') || context.issue.number
const token = getInput('token') || process.env.GITHUB_TOKEN || ''
const token = getInput('token') || ''
const trigger = getInput('trigger') || context.payload.comment?.body || ''
info(`context:${JSON.stringify(context, null, 2)}`)
if (context.eventName === 'issue_comment' && context.payload.pull_request) {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export interface TriggerContext {
}
export default function useTrigger(context: TriggerContext) {
const triggerRun = {
'tdesign-icons': () => icons(context),
'tdesign-common': () => common(context),
'tdesign-vue': () => vue(context),
'tdesign-icons': async () => await icons(context),
'tdesign-common': async () => await common(context),
'tdesign-vue': async () => await vue(context),
}
if (!Reflect.has(triggerRun, context.repo)) {
error(`${context.repo} 未适配`)
Expand Down

0 comments on commit bb648ed

Please sign in to comment.