fix: typo affecting commit and compareSHA#257
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files
☔ View full report in Codecov by Sentry. |
Bundle ReportChanges will increase total bundle size by 306.07kB (4.05%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: @codecov/vite-plugin-esmAssets Changed:
view changes for bundle: @codecov/rollup-plugin-esmAssets Changed:
view changes for bundle: @codecov/nuxt-plugin-esmAssets Changed:
view changes for bundle: @codecov/astro-plugin-esmAssets Changed:
view changes for bundle: @codecov/webpack-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-astro-app-server-esmAssets Changed:
view changes for bundle: @codecov/solidstart-plugin-esmAssets Changed:
view changes for bundle: @codecov/bundler-plugin-core-esmAssets Changed:
Files in
view changes for bundle: @codecov/nextjs-webpack-plugin-esmAssets Changed:
view changes for bundle: @codecov/remix-vite-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-next-app-client-array-pushAssets Changed:
view changes for bundle: @codecov/example-sveltekit-app-client-esmAssets Changed:
view changes for bundle: @codecov/sveltekit-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-sveltekit-app-server-esmAssets Changed:
view changes for bundle: @codecov/example-next-15-app-client-array-pushAssets Changed:
view changes for bundle: @codecov/bundler-plugin-core-cjsAssets Changed:
Files in
view changes for bundle: @codecov/example-astro-5-app-server-esmAssets Changed:
|
Bundle ReportChanges will decrease total bundle size by 13.4kB (-0.17%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: @codecov/bundler-plugin-core-cjsAssets Changed:
Files in
view changes for bundle: @codecov/remix-vite-plugin-esmAssets Changed:
view changes for bundle: @codecov/bundler-plugin-core-esmAssets Changed:
view changes for bundle: @codecov/nuxt-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-sveltekit-app-server-esmAssets Changed:
view changes for bundle: @codecov/solidstart-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-next-15-app-client-array-pushAssets Changed:
view changes for bundle: @codecov/example-sveltekit-app-client-esmAssets Changed:
view changes for bundle: @codecov/astro-plugin-esmAssets Changed:
view changes for bundle: @codecov/sveltekit-plugin-esmAssets Changed:
view changes for bundle: @codecov/bundle-analyzer-esmAssets Changed:
view changes for bundle: @codecov/example-astro-app-server-esmAssets Changed:
view changes for bundle: @codecov/vite-plugin-esmAssets Changed:
view changes for bundle: @codecov/nextjs-webpack-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-next-app-client-array-pushAssets Changed:
view changes for bundle: @codecov/rollup-plugin-esmAssets Changed:
view changes for bundle: @codecov/example-astro-5-app-server-esmAssets Changed:
|
|
|
||
| if (res.status !== 200) { | ||
| debug(`Failed to get job URL: ${res.status}`, { enabled: output.debug }); | ||
| debug(`Failed to get job U1RL: ${res.status}`, { enabled: output.debug }); |
| const payload = context.payload as PullRequestEvent; | ||
| commit = payload.pull_request.head.sha; | ||
| } else if ("merge_group" === context.eventName) { | ||
| const payload = context.payload as MergeGroupEvent; |
There was a problem hiding this comment.
is it reasonable to write tests for these?
spalmurray
left a comment
There was a problem hiding this comment.
couple comments, lgtm otherwise. Note that there's a whole process for releasing new versions that we'll need to do after this is merged
i also added checks for the merge group event just in case
|
|
||
| const context = GitHub.context; | ||
| let commit = envs?.GITHUB_SHA; | ||
| if (["pull_request", " pull_request_target"].includes(context.eventName)) { |
| head: { | ||
| sha: "test-head-sha", | ||
| label: headLabel, | ||
| if (["pull_request", "pull_request_target"].includes(eventName)) { |
There was a problem hiding this comment.
src/utils/providers/tests/GitHubActions.test.ts > GitHub Actions Params > gets correct params for a push event
Saw there is a failing unit test ^. For that, I think you can add "" for the mock creator here like if (["pull_request", "pull_request_target", ""].includes(eventName)) {.
That is to handle the case of setup({ eventName: "" }); in the "gets correct params for a push event" test.
| }, | ||
| "devDependencies": { | ||
| "@octokit/webhooks-definitions": "^3.67.3", | ||
| "@octokit/webhooks-types": "^7.6.1", |
There was a problem hiding this comment.
nice, thanks for moving this over
| if (["pull_request", "pull_request_target"].includes(context.eventName)) { | ||
| const payload = context.payload as PullRequestEvent; | ||
| compareSha = payload.pull_request.base.sha; | ||
| } else if ("merge_group" === context.eventName) { |
There was a problem hiding this comment.
I'll defer to @JerrySentry - any backend issues if we use the synthetic merge group commit sha to upload bundle sizes? I tried to find the history but seem to recall an issue in the past related to that
@octokit/webhook-definitionswas deprecated so i changed it to use@octokit/webhook-types(which has the definition for the MergeGroupEvent)