Skip to content

Conversation

@joseph-sentry
Copy link
Contributor

  • also added checks for the merge group event just in case
  • also @octokit/webhook-definitions was deprecated so i changed it to use @octokit/webhook-types (which has the definition for the MergeGroupEvent)

@codecov-notifications
Copy link

codecov-notifications bot commented May 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Components Coverage Δ
Plugin core 98.05% <100.00%> (+<0.01%) ⬆️
Rollup plugin 8.42% <ø> (ø)
Vite plugin 8.42% <ø> (ø)
Webpack plugin 56.84% <ø> (ø)

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented May 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.74%. Comparing base (1db06c3) to head (b2474d1).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
Plugin core 98.05% <100.00%> (+<0.01%) ⬆️
Rollup plugin 8.42% <ø> (ø)
Vite plugin 8.42% <ø> (ø)
Webpack plugin 56.84% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-staging
Copy link

codecov-staging bot commented May 2, 2025

Bundle Report

Changes will increase total bundle size by 306.07kB (4.05%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/bundler-plugin-core-cjs 313.93kB 266 bytes (0.08%) ⬆️
@codecov/bundler-plugin-core-esm 312.6kB 297.93kB (2030.71%) ⬆️
@codecov/nextjs-webpack-plugin-esm 4.86kB 3.74kB (336.0%) ⬆️
@codecov/solidstart-plugin-esm 3.03kB 2.08kB (219.7%) ⬆️
@codecov/remix-vite-plugin-esm 3.02kB 2.06kB (215.05%) ⬆️
@codecov/example-sveltekit-app-client-esm 727.67kB -2 bytes (-0.0%) ⬇️
@codecov/example-sveltekit-app-server-esm 984.06kB -1 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: @codecov/vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 1.24kB 1.24kB 100.0% 🚀
index.d.mts (Deleted) -1.24kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/rollup-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.mts (New) 1.3kB 1.3kB 100.0% 🚀
index.d.cts (Deleted) -1.3kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/nuxt-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 855 bytes 855 bytes 100.0% 🚀
index.d.cts (Deleted) -855 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/astro-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 862 bytes 862 bytes 100.0% 🚀
index.d.cts (Deleted) -862 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 3.45kB 3.45kB 100.0% 🚀
index.d.cts (Deleted) -3.45kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-astro-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
manifest_i0UWVC-G.mjs (New) 3.34kB 3.34kB 100.0% 🚀
manifest_Bca1gG0k.mjs (Deleted) -3.34kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/solidstart-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 3.03kB 3.03kB 100.0% 🚀
index.d.cts (Deleted) -949 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/bundler-plugin-core-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 312.6kB 312.6kB 100.0% 🚀
index.d.ts (Deleted) -14.67kB 0 bytes -100.0% 🗑️

Files in index.mjs:

  • ./src/utils/providers/GitHubActions.ts → Total Size: 5.93kB
view changes for bundle: @codecov/nextjs-webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 4.86kB 4.86kB 100.0% 🚀
index.d.mts (Deleted) -1.11kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/remix-vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.mjs (New) 3.02kB 3.02kB 100.0% 🚀
index.d.ts (Deleted) -957 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-next-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/L2piCIb0WWIar3P_hARWv/_buildManifest.js (New) 224 bytes 224 bytes 100.0% 🚀
static/L2piCIb0WWIar3P_hARWv/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/YZAA_rFVdFq_ksSPscOw5/_buildManifest.js (Deleted) -224 bytes 0 bytes -100.0% 🗑️
static/YZAA_rFVdFq_ksSPscOw5/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-sveltekit-app-client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
_app/immutable/chunks/entry.*.js -2 bytes 31.45kB -0.01%
view changes for bundle: @codecov/sveltekit-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.mts (New) 891 bytes 891 bytes 100.0% 🚀
index.d.ts (Deleted) -891 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-sveltekit-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/internal.js -1 bytes 18.48kB -0.01%
view changes for bundle: @codecov/example-next-15-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/oNSxUtiTsQ29Fa8qQNAK8/_buildManifest.js (New) 540 bytes 540 bytes 100.0% 🚀
static/oNSxUtiTsQ29Fa8qQNAK8/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/q9Ibi197otQ05-*.js (Deleted) -540 bytes 0 bytes -100.0% 🗑️
static/q9Ibi197otQ05-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/bundler-plugin-core-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 266 bytes 313.93kB 0.08%

Files in index.cjs:

  • ./src/utils/providers/GitHubActions.ts → Total Size: 5.96kB
view changes for bundle: @codecov/example-astro-5-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
manifest_C4C4X9rc.mjs (New) 3.37kB 3.37kB 100.0% 🚀
manifest_BW85_q3T.mjs (Deleted) -3.37kB 0 bytes -100.0% 🗑️

@codecov
Copy link

codecov bot commented May 2, 2025

Bundle Report

Changes will decrease total bundle size by 13.4kB (-0.17%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/bundler-plugin-core-cjs 313.93kB 266 bytes (0.08%) ⬆️
@codecov/rollup-plugin-esm 1.3kB -5.11kB (-79.7%) ⬇️
@codecov/nuxt-plugin-esm 855 bytes -2.36kB (-73.37%) ⬇️
@codecov/example-sveltekit-app-client-esm 727.67kB 2 bytes (0.0%) ⬆️
@codecov/example-sveltekit-app-server-esm 984.06kB 1 bytes (0.0%) ⬆️
@codecov/bundle-analyzer-esm 3.11kB -3.79kB (-54.96%) ⬇️
@codecov/astro-plugin-esm 862 bytes -2.41kB (-73.62%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: @codecov/bundler-plugin-core-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.cjs 266 bytes 313.93kB 0.08%

Files in index.cjs:

  • ./src/utils/providers/GitHubActions.ts → Total Size: 5.96kB
view changes for bundle: @codecov/remix-vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 957 bytes 957 bytes 100.0% 🚀
index.d.cts (Deleted) -957 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/bundler-plugin-core-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 14.67kB 14.67kB 100.0% 🚀
index.d.mts (Deleted) -14.67kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/nuxt-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 855 bytes 855 bytes 100.0% 🚀
index.mjs (Deleted) -3.21kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-sveltekit-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/internal.js 1 bytes 18.48kB 0.01%
view changes for bundle: @codecov/solidstart-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 949 bytes 949 bytes 100.0% 🚀
index.d.mts (Deleted) -949 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-next-15-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/OBqfE67rVjB89FvS0tEC3/_buildManifest.js (New) 540 bytes 540 bytes 100.0% 🚀
static/OBqfE67rVjB89FvS0tEC3/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/Ot1OO_g8jGSJG1JYYVX3X/_buildManifest.js (Deleted) -540 bytes 0 bytes -100.0% 🗑️
static/Ot1OO_g8jGSJG1JYYVX3X/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-sveltekit-app-client-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
_app/immutable/chunks/entry.*.js 2 bytes 31.45kB 0.01%
view changes for bundle: @codecov/astro-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 862 bytes 862 bytes 100.0% 🚀
index.mjs (Deleted) -3.27kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/sveltekit-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 891 bytes 891 bytes 100.0% 🚀
index.d.cts (Deleted) -891 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/bundle-analyzer-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 2.77kB 2.77kB 100.0% 🚀
cli.d.ts (New) 342 bytes 342 bytes 100.0% 🚀
index.mjs (Deleted) -3.92kB 0 bytes -100.0% 🗑️
cli.mjs (Deleted) -2.98kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-astro-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
manifest_6wgofdoY.mjs (New) 3.34kB 3.34kB 100.0% 🚀
manifest_HuGlrTpA.mjs (Deleted) -3.34kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/vite-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 1.24kB 1.24kB 100.0% 🚀
index.d.mts (Deleted) -1.24kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/nextjs-webpack-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 1.11kB 1.11kB 100.0% 🚀
index.d.mts (Deleted) -1.11kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-next-app-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/RLNV9RSuzdjodq6nlPLyw/_buildManifest.js (New) 224 bytes 224 bytes 100.0% 🚀
static/RLNV9RSuzdjodq6nlPLyw/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/RnFToGiwg1yx9VU1cF_zO/_buildManifest.js (Deleted) -224 bytes 0 bytes -100.0% 🗑️
static/RnFToGiwg1yx9VU1cF_zO/_ssgManifest.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/rollup-plugin-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
index.d.ts (New) 1.3kB 1.3kB 100.0% 🚀
index.mjs (Deleted) -6.41kB 0 bytes -100.0% 🗑️
view changes for bundle: @codecov/example-astro-5-app-server-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
manifest_CMgwMt3u.mjs (New) 3.37kB 3.37kB 100.0% 🚀
manifest_CB82o5an.mjs (Deleted) -3.37kB 0 bytes -100.0% 🗑️


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 });

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;

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?

Copy link

@spalmurray spalmurray left a 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)) {
Copy link
Contributor

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)) {
Copy link
Contributor

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",
Copy link
Contributor

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) {
Copy link
Contributor

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

@joseph-sentry joseph-sentry merged commit 360eb46 into main May 15, 2025
70 checks passed
@joseph-sentry joseph-sentry deleted the joseph/fix branch May 15, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants