-
Notifications
You must be signed in to change notification settings - Fork 114
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
chore(git-node): Add make lint-md reminder #883
base: main
Are you sure you want to change the base?
Conversation
After two consecutive releases in which I mistakely pushed a broken release commit to main, I'm convinced that the process needs improvement. This changeset proposes to add a reminder to `git node release promote` to lint markdown files prior to pushing branches to upstream remote. Refs: nodejs/node@a344300 Refs: nodejs/node#56508
ba67a3c
to
f2ad232
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #883 +/- ##
=======================================
Coverage 80.08% 80.08%
=======================================
Files 39 39
Lines 4676 4676
=======================================
Hits 3745 3745
Misses 931 931 ☔ View full report in Codecov by Sentry. |
cli.separator(); | ||
cli.warn('Reminder: Lint markdown files'); | ||
cli.info('You might need to amend the commit if there are issues:'); | ||
cli.info('make lint-md'); | ||
cli.separator(); |
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.
Maybe it makes more sense to move that to the branch where we know there were conflicts (line 168), for the cases where there are no conflicts, it seems safe to skip it
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.
That was my original assessment but in the specific occurrence linked in the PR body the bad formatting was introduced by a git automatic resolution, meaning that in theory a successfully cherry-picked commit could potentially still introduce markdown issues.
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 don't believe it, if I try locally:
git reset a344300bfa146fce9d1f20a71b073263a4720eab^ --hard # rewind just before the faulty commit
git cherry-pick v22.13.0^0 # cherry-pick the release commit
All 7 of the YAML sections fixed by nodejs/node@5119049 show up as conflict that must be manually resolved. There might be something else that "does it for you" (like an IDE extension or whatnot), but I'm quite confident git would never
After two consecutive releases in which I mistakenly pushed a broken release commit to main, I'm convinced that the process needs improvement.
This PR proposes to add a reminder to
git node release promote
to lint markdown files prior to pushing branches to upstream remote.Refs: nodejs/node@a344300
Refs: nodejs/node#56508