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

Merged
merged 23 commits into from
Jun 2, 2025

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 f7bc773
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/68383b17a58dc8000977089d
😎 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 project configuration.

Copy link

codecov bot commented Apr 11, 2025

Codecov Report

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

Project coverage is 53.80%. Comparing base (25dbd56) to head (f7bc773).
Report is 24 commits behind head on main.

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 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #976      +/-   ##
==========================================
+ Coverage   48.70%   53.80%   +5.09%     
==========================================
  Files          53       53              
  Lines        2166     2171       +5     
  Branches      242      244       +2     
==========================================
+ Hits         1055     1168     +113     
+ Misses       1074      952     -122     
- Partials       37       51      +14     

☔ 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

@kriswest
Copy link
Contributor Author

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

@JamieSlome JamieSlome self-requested a review April 29, 2025 10:15
@kriswest
Copy link
Contributor Author

kriswest commented Apr 29, 2025 via email

@kriswest
Copy link
Contributor Author

kriswest commented May 7, 2025

tests on the way - edit: tests for parsePush added

@kriswest
Copy link
Contributor Author

kriswest commented May 8, 2025

Tests added based on conventional commit messages with a newline at the end.

I get zlib errors (`Error: incorrect header check') as it processes the compressed content, I suspect it always throws these. Doesn't seem to cause any issue with the parsing however...

@kriswest
Copy link
Contributor Author

kriswest commented May 8, 2025

One more test coming (took me a while to find and harvest data from a commit with no newline at the end of the message)... Will push tomorrow

@kriswest
Copy link
Contributor Author

kriswest commented May 9, 2025

@JamieSlome added the final test. @hemantsharma90 tracked the commits with no newline back to the IntelliJ git client. They do appear to be valid, and parse correctly after this PR.

Copy link
Member

@JamieSlome JamieSlome left a comment

Choose a reason for hiding this comment

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

LGTM! 🍰

@JamieSlome JamieSlome merged commit 4387684 into finos:main Jun 2, 2025
14 checks passed
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
2 participants