-
-
Notifications
You must be signed in to change notification settings - Fork 71
Description
We tried using plugin version v1.4.0-RC5 and noticed that while freshly opened PRs are built, updating a PR (i.e. pushing new commits) did not trigger a material update anymore.
Digging into it, I believe the reason is the upgrade of git-cmd to 2.0 in #179. With git-cmd 2.0, the semantics of getRevisionsSince changed (ashwanthkumar/git-cmd@418d353):
@Override
public List<Revision> getRevisionsSince(String revision, List<String> subPaths) {
- return gitLog(logSubPathArgs(String.format("%s..", revision), subPaths));
+ return gitLog(logArgs(subPaths, String.format("%s..%s", revision, gitConfig.getRemoteBranch())));
}
When a PR is updated, the plugin does the following in my understanding:
- Clones the repo
- Does a hard reset to the newest commit of the PR
- Runs getRevisionsSince to get the commits between last known commit and newest commit
Previously, this last step essentially ran git log LAST_KNOWN_SHA.. which returns the list of commits from LAST_KNOWN_SHA to HEAD (which is newest PR commit because of step 2 above). Now it does git log LAST_KNOWN_SHA..origin/defaultBranch which will not return any commits given that they are not on the default branch yet.
I know this repo is not very active anymore and we have no urgent need of a fix, given said version is experimental. Just wanted to report in case a full release of the plugin is done at some point.