Skip to content

Commit

Permalink
fix: next ref is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed May 13, 2024
1 parent bbad026 commit d7ed5d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/github/service/opensumi.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { CoreRepo, ActionsRepo } from '@/constants/opensumi';
import { ActionsRepo } from '@/constants/opensumi';
import { GitHubService } from '@opensumi/octo-service';

import { firstLine } from '../renderer/line';

export class OpenSumiOctoService extends GitHubService {
async releaseNextVersion(branch: string, workflowRef = 'main') {
const workflow = await this.octo.actions.createWorkflowDispatch({
owner: 'opensumi',
repo: 'core',
workflow_id: ActionsRepo.RELEASE_NEXT_BY_REF,
...ActionsRepo.RELEASE_NEXT_BY_REF_WORKFLOW,
ref: workflowRef,
inputs: {
ref: branch,
Expand Down
8 changes: 7 additions & 1 deletion src/im/commands/opensumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,13 @@ async function publishNextVersion({ ctx, bot }: IMCommandCenterContext) {

if (ref) {
try {
await app.octoService.getRefInfoByRepo(ref, 'opensumi', 'core');
try {
await app.octoService.getRefInfoByRepo(ref, 'opensumi', 'core');
} catch (error) {
await bot.replyText(
`找不到 ref: ${ref}, 错误信息: ${(error as Error).message}`,
);
}
const text = await app.opensumiOctoService.getLastNCommitsText({
owner: 'opensumi',
repo: 'core',
Expand Down

0 comments on commit d7ed5d7

Please sign in to comment.