Skip to content

Commit

Permalink
chore: temporary error for element plus (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aslemammad authored Dec 15, 2024
1 parent 77a7592 commit 364d7cc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: pkg.pr.new stats

on:
push:
branches:
- main

jobs:
stats:
Expand Down
59 changes: 40 additions & 19 deletions packages/backend/server/routes/publish.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,25 +254,46 @@ export default eventHandler(async (event) => {
},
);
} else {
await installation.request(
"POST /repos/{owner}/{repo}/issues/{issue_number}/comments",
{
owner: workflowData.owner,
repo: workflowData.repo,
issue_number: Number(workflowData.ref),
body: generatePullRequestPublishMessage(
origin,
templatesHtmlMap,
packagesWithoutPrefix,
workflowData,
compact,
onlyTemplates,
checkRunUrl,
packageManager,
comment === "update" ? "ref" : "sha",
),
},
);
try {
await installation.request(
"POST /repos/{owner}/{repo}/issues/{issue_number}/comments",
{
owner: workflowData.owner,
repo: workflowData.repo,
issue_number: Number(workflowData.ref),
body: generatePullRequestPublishMessage(
origin,
templatesHtmlMap,
packagesWithoutPrefix,
workflowData,
compact,
onlyTemplates,
checkRunUrl,
packageManager,
comment === "update" ? "ref" : "sha",
),
},
);
} catch (error) {
throw createError({
statusCode: 500,
message: `Failed to create pull request comment. Details:
Error: ${error instanceof Error ? error.message : String(error)}
Context:
- Owner: ${workflowData.owner}
- Repo: ${workflowData.repo}
- Issue Number: ${Number(workflowData.ref)}
- Origin: ${origin}
- Templates: ${JSON.stringify(templatesHtmlMap)}
- Packages: ${packagesWithoutPrefix.join(', ')}
- Workflow Data: ${JSON.stringify(workflowData)}
- Compact: ${compact}
- Only Templates: ${onlyTemplates}
- Check Run URL: ${checkRunUrl}
- Package Manager: ${packageManager}
- Comment Type: ${comment === "update" ? "ref" : "sha"}`,
});
}
}
}
}
Expand Down

0 comments on commit 364d7cc

Please sign in to comment.