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

Correctly Handle renamed-only Files #329

Merged
merged 6 commits into from
Feb 3, 2019
Merged

Correctly Handle renamed-only Files #329

merged 6 commits into from
Feb 3, 2019

Conversation

alessio-signorini
Copy link
Contributor

@alessio-signorini alessio-signorini commented Dec 28, 2018

The current implementation of Pronto does not correctly consider renamed-only files which are considered new additions. This forces the runners to analyze the code and creates numerous issues when submitting PRs to Github. A summary of the issue and related issues can be found in #328.

This PR addresses the issue using patches.find_similar!(:renames => true) so that patches have the correct type (i.e., renamed) for those files. The analysis will be slightly slower but it should not be a problem.

@alessio-signorini
Copy link
Contributor Author

alessio-signorini commented Dec 29, 2018

I included a test! It adds a bunch of fixtures files (due to the extra git repository). Sorry about that.

The only change in the actual code is this line.

lib/pronto/git/repository.rb Outdated Show resolved Hide resolved
spec/fixtures/renamed-file.git/hooks/applypatch-msg.sample Outdated Show resolved Hide resolved
@alessio-signorini
Copy link
Contributor Author

Should be all good now @doomspork, thanks for the review!

@doomspork doomspork dismissed their stale review December 29, 2018 22:29

Code has updated

@doomspork doomspork requested a review from a team December 29, 2018 22:29
@doomspork
Copy link
Member

Awesome @alessio-signorini! I'm going to give the other @prontolabs/core folks a chance to look this over before I merge.

@alessio-signorini
Copy link
Contributor Author

@doomspork - did you hear back? :)

@mmozuras mmozuras merged commit 4b9e4b4 into prontolabs:master Feb 3, 2019
@mmozuras
Copy link
Member

mmozuras commented Feb 3, 2019

@alessio-signorini concur with @doomspork - awesome job 😄

apiology pushed a commit to apiology/pronto that referenced this pull request Dec 27, 2019
…named-only-files

Correctly Handle renamed-only Files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants