Skip to content
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

fix: splice badges in readme during migration #847

Merged
merged 5 commits into from
Sep 20, 2023

Conversation

JoshuaKGoldberg
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg commented Sep 19, 2023

PR Checklist

Overview

  • Detecting existing badges
  • Splicing new badges alongside existing equivalents and other badges
  • Inject into an existing <p>...</p> instead of prepending a new one

writeReadme's logic is complex enough now that I gave it its own writeReadme/index.ts.

Verified with unit tests in the PR as well as running JoshuaKGoldberg/all-contributors-auto-action#68 locally.

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #847 (a6909ef) into main (858847a) will increase coverage by 0.22%.
Report is 6 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #847      +/-   ##
==========================================
+ Coverage   92.17%   92.40%   +0.22%     
==========================================
  Files          84       87       +3     
  Lines        4232     4345     +113     
  Branches      263      280      +17     
==========================================
+ Hits         3901     4015     +114     
+ Misses        331      330       -1     
Flag Coverage Δ
create 71.44% <54.92%> (-0.43%) ⬇️
initialize 34.39% <13.14%> (-0.31%) ⬇️
migrate 71.41% <74.64%> (+0.15%) ⬆️
unit 53.88% <100.00%> (+1.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/create/createWithOptions.ts 69.11% <100.00%> (ø)
src/migrate/migrateWithOptions.ts 77.61% <100.00%> (ø)
src/steps/writeReadme/findExistingBadges.ts 100.00% <100.00%> (ø)
src/steps/writeReadme/findIntroSectionClose.ts 100.00% <100.00%> (ø)
src/steps/writeReadme/generateTopContent.ts 100.00% <100.00%> (ø)
src/steps/writeReadme/index.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review September 20, 2023 20:56
@JoshuaKGoldberg JoshuaKGoldberg merged commit 20c44e9 into main Sep 20, 2023
16 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the readme-badge-splicing branch September 20, 2023 22:07
@github-actions
Copy link

🎉 This is included in version v1.29.48 🎉

The release is available on:

Cheers! 📦🚀

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.

🐛 Bug: Existing description and badges not detected
1 participant