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(remote): Fix detection of GitLab merge request sha if commits were squashed #1043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hackenbergstefan
Copy link
Contributor

Description

GitLabMergeRequest::merge_commit() now returns the squash_commit_sha instead of None if the commits where squashed in the Merge Request.

Motivation and Context

In the generation of the changelog commits were not linked to their GitLab MR if the commits were squashed.
This change allows to identify the corresponding GitLab MR independently if the commit in the MR were squashed or not.

How Has This Been Tested?

Unittest added.

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly. [imho not necessary]
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.94%. Comparing base (0f653bf) to head (f57d51f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1043      +/-   ##
==========================================
+ Coverage   41.93%   41.94%   +0.01%     
==========================================
  Files          21       21              
  Lines        1784     1786       +2     
==========================================
+ Hits          748      749       +1     
- Misses       1036     1037       +1     
Flag Coverage Δ
unit-tests 41.94% <100.00%> (+0.01%) ⬆️

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

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

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.

2 participants