-
Notifications
You must be signed in to change notification settings - Fork 6
fix: typo affecting commit and compareSHA #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it reasonable to write tests for these?
spalmurray
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch on that hidden typo
| head: { | ||
| sha: "test-head-sha", | ||
| label: headLabel, | ||
| if (["pull_request", "pull_request_target"].includes(eventName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)