diff --git a/.eslintrc.js b/.eslintrc.js index bc00270..4da408b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,6 +11,7 @@ module.exports = { rules: { '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/no-namespace': 'off', + '@typescript-eslint/no-explicit-any': 'warn', 'import/order': [ 'error', { diff --git a/src/github/service/opensumi.ts b/src/github/service/opensumi.ts index 0d5b0c5..2010e63 100644 --- a/src/github/service/opensumi.ts +++ b/src/github/service/opensumi.ts @@ -12,11 +12,9 @@ export class OpenSumiOctoService extends GitHubService { repo: string; }, branch: string, - workflowRef = 'main', ) { const workflow = await this.octo.actions.createWorkflowDispatch({ ...workflowInfo, - ref: workflowRef, inputs: { ref: branch, }, diff --git a/src/im/commands/opensumi.ts b/src/im/commands/opensumi.ts index add223b..9348681 100644 --- a/src/im/commands/opensumi.ts +++ b/src/im/commands/opensumi.ts @@ -171,8 +171,6 @@ async function publishNextVersion( } if (payload.args['workflow-ref']) { workflowRef = payload.args['workflow-ref']; - } else { - workflowRef = ref; } } @@ -187,21 +185,21 @@ async function publishNextVersion( } const text = await app.opensumiOctoService.getLastNCommitsText({ owner: 'opensumi', - repo: repo, + repo, ref, }); const name = repo === 'core' ? 'OpenSumi' : 'CodeBlitz'; const workflowInfo = repo === 'core' - ? ActionsRepo.RELEASE_NEXT_BY_REF_WORKFLOW - : ActionsRepo.CODEBLITZ_RELEASE_NEXT_BY_REF_WORKFLOW; + ? { ...ActionsRepo.RELEASE_NEXT_BY_REF_WORKFLOW } + : { ...ActionsRepo.CODEBLITZ_RELEASE_NEXT_BY_REF_WORKFLOW }; - await app.opensumiOctoService.releaseNextVersion( - workflowInfo, - ref, - workflowRef, - ); + if (workflowRef) { + workflowInfo.ref = workflowRef; + } + + await app.opensumiOctoService.releaseNextVersion(workflowInfo, ref); await bot.reply( convertToDingMarkdown( `Releasing a next version of ${name}`,