Skip to content

[jsweep] Clean upload_assets.cjs - #48280

Merged
pelikhan merged 1 commit into
mainfrom
signed/jsweep/upload-assets-dedup-normalize-94bca5ba350daba0
Jul 27, 2026
Merged

[jsweep] Clean upload_assets.cjs#48280
pelikhan merged 1 commit into
mainfrom
signed/jsweep/upload-assets-dedup-normalize-94bca5ba350daba0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Removes the duplicated normalizeBranchName function from upload_assets.cjs and imports it from normalize_branch_name.cjs instead. The two implementations were identical (the canonical version has an optional salt parameter that defaults to null and has no effect when omitted by upload_assets).

Also removes the stale "keep in sync" comment from normalize_branch_name.cjs since it is now the single source of truth.

File Cleaned

upload_assets.cjs — github-script context

Changes

  • Removed 45 lines of duplicate normalizeBranchName implementation
  • Added require import of normalizeBranchName from ./normalize_branch_name.cjs
  • Removed stale sync reminder comment from normalize_branch_name.cjs

Test Coverage

No new tests needed — existing 14 tests in upload_assets.test.cjs already cover normalizeBranchName behavior (including the normalization test at line 121) and all pass with the import-based approach.

Validation ✅

  • Formatting: npm run format:cjs
  • Linting: npm run lint:cjs
  • Type checking: npm run typecheck
  • Tests: npm run test:js ✓ (all 14 upload_assets tests pass; other pre-existing failures unrelated to this change)

Generated by 🧹 jsweep - JavaScript Unbloater · ⌖ 10.3 AIC ·

  • expires on Jul 28, 2026, 9:07 PM UTC-08:00

Import normalizeBranchName from normalize_branch_name.cjs instead of
maintaining a copy. The two implementations were identical (upload_assets
lacked the optional salt parameter which defaults to null and has no
effect when omitted).
Also remove the stale sync-reminder comment from normalize_branch_name.cjs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review July 27, 2026 05:13
CopilotAI review requested due to automatic review settings July 27, 2026 05:13
@github-actions

github-actionsBot commented Jul 27, 2026

Copy link
Copy Markdown
ContributorAuthor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actionsBot commented Jul 27, 2026

Copy link
Copy Markdown
ContributorAuthor

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #48280 does not have the 'implementation' label and has 0 new lines of code in business logic directories (threshold: 100).

@github-actions

github-actionsBot commented Jul 27, 2026

Copy link
Copy Markdown
ContributorAuthor

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. This is a code cleanup PR ([jsweep] Clean upload_assets.cjs) affecting only production files (actions/setup/js/normalize_branch_name.cjs, actions/setup/js/upload_assets.cjs). Test Quality Sentinel analysis not applicable.

@github-actions

github-actionsBot commented Jul 27, 2026

Copy link
Copy Markdown
ContributorAuthor

PR Code Quality Reviewer completed the code quality review.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Centralizes branch-name normalization by reusing the canonical helper.

Changes:

  • Imports normalizeBranchName in upload_assets.cjs.
  • Removes duplicate implementation and stale synchronization comment.
Show a summary per file
FileDescription
actions/setup/js/upload_assets.cjsReplaces duplicated logic with shared helper.
actions/setup/js/normalize_branch_name.cjsRemoves obsolete synchronization guidance.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design — clean deduplication, no blocking issues.

📋 Highlights

Positive Highlights

  • ✅ Eliminates the duplicated normalizeBranchName implementation — single source of truth
  • ✅ Removes the stale "keep in sync" comment, a maintenance hazard
  • ✅ Import correctly delegates to normalize_branch_name.cjs
  • ✅ No behaviour change: salt param defaults to null with no effect when omitted

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 16.2 AIC · ⌖ 4.52 AIC · ⊞ 6.7K
Comment /matt to run again

@github-actions

Copy link
Copy Markdown
ContributorAuthor

🧪 Test Quality Sentinel Report

Test Quality Score: N/A — No Test Files

No test files were added or modified in this PR. This is a code cleanup PR affecting only production files:

  • actions/setup/js/normalize_branch_name.cjs
  • actions/setup/js/upload_assets.cjs

Verdict

passed. No behavioral tests to analyze; test quality analysis not applicable.

🧪 Test quality analysis by Test Quality Sentinel · haiku45 · 7.64 AIC · ⌖ 15.5 AIC · ⊞ 8.1K ·
Comment /review to run again

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — clean deduplication

The duplicate normalizeBranchName implementation has been correctly removed from upload_assets.cjs and replaced with an import from the canonical normalize_branch_name.cjs. The optional salt parameter defaults to null and is not passed at the call site, so runtime behavior is identical. No issues found.

🔎 Code quality review by PR Code Quality Reviewer · sonnet46 · 15.3 AIC · ⌖ 4.5 AIC · ⊞ 5.7K
Comment /review to run again

@github-actionsgithub-actionsBot mentioned this pull request Jul 27, 2026

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good cleanup — removes duplicated normalizeBranchName from upload_assets.cjs and imports the canonical implementation from normalize_branch_name.cjs. No blocking issues found.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · sonnet46 · 12.1 AIC · ⌖ 4.48 AIC · ⊞ 5K

@pelikhan
pelikhan merged commit bd30dd5 into mainJul 27, 2026
52 of 60 checks passed
@github-actions

Copy link
Copy Markdown
ContributorAuthor

🎉 This pull request is included in a new release.

Release: v0.83.4

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pelikhan