You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,14 +113,16 @@ affectedModuleDetector {
113
113
-`logFilename`: A filename for the output detector to use
114
114
-`logFolder`: A folder to output the log file in
115
115
-`specifiedBranch`: A branch to specify changes against. Must be used in combination with configuration `compareFrom = "SpecifiedBranchCommit"`
116
+
-`specifiedRawCommitSha`: A raw commit SHA to specify changes against. Must be used in combination with configuration `compareFrom = "SpecifiedRawCommitSha"`
116
117
-`ignoredFiles`: A set of files that will be filtered out of the list of changed files retrieved by git.
117
118
-`buildAllWhenNoProjectsChanged`: If true, the plugin will build all projects when no projects are considered affected.
118
119
-`compareFrom`: A commit to compare the branch changes against. Can be either:
119
120
- PreviousCommit: compare against the previous commit
120
121
- ForkCommit: compare against the commit the branch was forked from
121
122
- SpecifiedBranchCommit: compare against the last commit of `$specifiedBranch` using `git rev-parse` approach.
122
123
- SpecifiedBranchCommitMergeBase: compare against the nearest ancestors with `$specifiedBranch` using `git merge base` approach.
123
-
124
+
- SpecifiedRawCommitSha: compare against the provided raw commit SHA.
125
+
124
126
**Note:** specify the branch to compare changes against using the `specifiedBranch` configuration before the `compareFrom` configuration
125
127
-`excludedModules`: A list of modules that will be excluded from the build process, can be the name of a module, or a regex against the module gradle path
126
128
-`includeUncommitted`: If uncommitted files should be considered affected
@@ -162,6 +164,12 @@ Suppose we have changed 6 files in our "feature" branch.
162
164
163
165
Hence, depending on your CI settings you have to configure AMD appropriately.
164
166
167
+
## SpecifiedRawCommitSha
168
+
169
+
If you want AMD plugin to skip performing the git operations under-the-hood (like `git rev-parse` and `git merge base`), you can provide the raw commit SHA you wish to compare against.
170
+
One of the main reasons you might want to follow this approach is, maybe your environment leverages [Git mirroring](https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating-a-repository) for speed optimizations, for example CI/CD environments.
171
+
Mirroring _can_ lead to inaccurate common ancestor commits as the duplicated repository _may be_ out of sync with the true remote repository.
172
+
165
173
## Sample Usage
166
174
167
175
Running the plugin generated tasks is quite simple. By default, if `affected_module_detector.enable` is not set,
0 commit comments