-
Notifications
You must be signed in to change notification settings - Fork 43
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
Feature/new specified branch commit #164
Feature/new specified branch commit #164
Conversation
Codecov Report
@@ Coverage Diff @@
## main #164 +/- ##
============================================
+ Coverage 51.50% 52.39% +0.89%
- Complexity 72 75 +3
============================================
Files 13 14 +1
Lines 532 542 +10
Branches 98 99 +1
============================================
+ Hits 274 284 +10
Misses 232 232
Partials 26 26
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This seems to be failing both building the sample app and the code coverage (there does not appear to be any tests in here). This also seems to be a near duplicate of |
Hey Josh! I added tests for the new approach! We must save SpecifiedBranchCommit2 and Fork commit separately. |
.../src/test/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleDetectorIntegrationTest.kt
Outdated
Show resolved
Hide resolved
import com.dropbox.affectedmoduledetector.GitClient | ||
import com.dropbox.affectedmoduledetector.Sha | ||
|
||
class SpecifiedBranchCommit2(private val specifiedBranch: String) : CommitShaProvider { |
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.
Can you please try to think of a better name for this? I understand naming is hard but adding 2
to the end doesn't explain much and makes it a bit confusing
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.
Yep, I really agree with u. I thought about it but can't make it better.
I considered SpecifiedBranchCommitMergeBase
and SpecifiedBranchCommit2
plus explanation in readme.md
in both cases.
What do u think about SpecifiedBranchCommitMergeBase
? Or, maybe can u suggest another name?
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.
SpecifiedBranchCommitMergeBase works for me
Feature/new specified branch commit
Problem:
Depends on CI configurations might be some problem with false positive affected files in AMD.
What I did?
git rev-parse
command for getting sha.git merge base
command for getting sha.What does it mean?
When we run any AMD command we compare the current branch with the specified parent branch. Consider an example when, during the development of our feature,
another developer merged his changes (9 files) into our common remote parent branch - "origin/dev".
Please, look at picture:
Suppose we have changed 6 files in our "feature" branch.
AMD will show the result that 15 files were affected. Because our branch is not updated (pull) and AMD will see our 6 files and 9 files that were merged by another developer.
AMD will show the result that 6 files were affected. And this is the correct behavior.
Hence, depends on your CI settings you have to configure AMD right.