Skip to content

fix: push parsing drops commit messages unless they end in a newline #976

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kriswest
Copy link
Contributor

resolves #971

Adjusts push parsing to not require a newline at the end commit messages in order to capture them.

Also adjusts CLI tests to clean up the rows they create, so that they can be run multiple times without the DB files needing to be reset.

@github-actions github-actions bot added the fix label Apr 11, 2025
Copy link

netlify bot commented Apr 11, 2025

Deploy Preview for endearing-brigadeiros-63f9d0 ready!

Name Link
🔨 Latest commit e64058d
🔍 Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/67ffe17a8f3a9e000891f3e0
😎 Deploy Preview https://deploy-preview-976--endearing-brigadeiros-63f9d0.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 50.87%. Comparing base (3718943) to head (e64058d).

Files with missing lines Patch % Lines
src/db/file/pushes.ts 66.66% 1 Missing and 1 partial ⚠️
src/proxy/processors/push-action/parsePush.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #976      +/-   ##
==========================================
+ Coverage   49.65%   50.87%   +1.21%     
==========================================
  Files          48       48              
  Lines        1718     1724       +6     
  Branches      175      176       +1     
==========================================
+ Hits          853      877      +24     
+ Misses        841      818      -23     
- Partials       24       29       +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kriswest
Copy link
Contributor Author

Fixed the cypress test but am waiting on a review (in git proxy), will update monday with working cypress tests

@kriswest
Copy link
Contributor Author

Code coverage is probably as good as I can get it - more to come on DB code coverage in #979

return new Promise<void>((resolve, reject) => {
db.remove({ id }, (err) => {
if (err) {
reject(err);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ignore lines like this in #979 for coverage as its hard to get neDB to actually throw an error without corrupting the database file.

Comment on lines +103 to +104
.slice(indexOfMessages + 1)
.join(' ').trim();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main change in this PR - the rest is all related to testing - although there is no direct testing of pushParsing currently implemented.

The change seems to resolve the issue for me on the PR where we had this issue (which was contributed without the problem message already).

@kriswest
Copy link
Contributor Author

@JamieSlome @grovesy @coopernetes This is ready for a review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push parsing sometimes truncates commit messages and rejects them as empty
1 participant