Comments (12)
Merged preliminary config. I need to push it down to module granularity next
from affectedmoduledetector.
I've been slowly working on a similar plugin at work, so thanks for open sourcing this and finishing my work for me! 😆
For instance, what I was working on, the main focus was for CI so my branches would be a remote branch, not local (although I was planning on a way to config local vs remote). Would need to handle a situation where the branch does not exists, is there a fallback or do you error?
If I were to try and spend some time implementing this enhancement, do you have any guidance on what you would like to see for this enhancement? Please don't wait for me to get around to this enhancement as my day to day varies on how much coding I can do.
from affectedmoduledetector.
Glad to hear this is helpful for you!
We currently only support running on the local branch and will assume the last commit has all the changes to consider. This is a byproduct of how our CI system works, but understand most aren't like this.
If this was to be added, I would expect that we'd want to allow configuration via the extension
And then updating the GitClient to make the appropriate queries into git. findChangedFilesSince
returns a list of files which will be used to determine the changeset.
from affectedmoduledetector.
I'm planning to take this issue up today
from affectedmoduledetector.
I was also thinking of another ability for the plugin: comparing the changes of the current branch to the parent fork point. Would this be ok to implement?
If so, I noticed in the thread above you mentioned to implement a similar extension to this plugin "allow configuration via the extension". Am I along the right lines in thinking of adding a commitCommand
config value that defaults to your current implementation but also allows for extension of other commit sha obtaining commands that can be added in the future?
Something like this? https://gist.github.com/jonnycaley/ad196a3a258dfb0e271a4a261a646426
If not, no worries 😄
from affectedmoduledetector.
Yup makes sense! I've added the base git logic here. It just needs to be enabled if the extension has a prop.
I can finish impl over holidays unless someone wants to go to ahead and complete it.
from affectedmoduledetector.
What does that command do? I can't work it out from the shell output 😅
from affectedmoduledetector.
It should be finding the last merge commit. In theory that should be where you last branched
from affectedmoduledetector.
Ahhh, when I pasted that into a shell it doesn't remove every other \
so I was getting confused. 😅
I think that command gets the parent branch (also found here). We should be able to combine it with the current branch and the command git merge-base current parent
to find the commit fork point, something like this:
git merge-base $(git rev-parse --abbrev-ref HEAD) $(git show-branch -a | grep '\*' | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//')
If that looks ok i'd like to have a crack at it over the next week or so 😄
from affectedmoduledetector.
Looks great, please do!
from affectedmoduledetector.
I'm running into bad sha1 reference
when I try and run the command PREV_MERGE_CMD
in the process builder (works fine in a bash shell). Any ideas why and how to get around it?
from affectedmoduledetector.
It seems ProcessBuilder does not use a shell to execute the commands, so grep is not supported. I'll use kotlin string manipulation instead to get the branch name
from affectedmoduledetector.
Related Issues (20)
- excludedModules is not working with custom task. HOT 4
- CustomTask should use Gradle's NamedDomainObjectContainer or NamedDomainObjectSet HOT 1
- Support exotic non standard Gradle project structures
- DependencyTracker written in Groovy
- Add an option to exclude jvm test paths HOT 1
- Assemble only affected Apps in multimodle project HOT 1
- Mixing java libraries with android libraries HOT 1
- Getting a list of changed/dependent modules without running tests HOT 1
- Unable to get Log files to generate HOT 7
- When running with clean Task, all the tests are run HOT 1
- A version bump to a runtimeOnly dependency does not mark module as affected HOT 2
- Help debugging why unnecessary tasks are running HOT 4
- Depends on gradle tasks only if project is affected HOT 3
- Dry run of gradle cmd HOT 1
- Sample project fails to compile HOT 2
- Custom task executed on all modules instead of only affected modules HOT 8
- Slashes in current branch name being replaced with backslashes on windows HOT 1
- running all tests everytime HOT 1
- Weird behavior on git commands HOT 4
- Non-java Modules don't get tested
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from affectedmoduledetector.