private String computeChangeString(AbstractBuild<?, ?> build) {
String changeString = "No changes";
if (!build.hasChangeSetComputed()) {
changeString = "Changes not determined";
} else if (build.getChangeSet().iterator().hasNext()) {
ChangeLogSet changeSet = build.getChangeSet();
ChangeLogSet.Entry entry = build.getChangeSet().iterator().next();
// note: iterator should return recent changes first, but GitChangeSetList currently reverses the log entries
if (changeSet.getClass().getSimpleName().equals("GitChangeSetList")) {
String exceptionLogMsg = "Workaround to obtain latest commit info from git plugin failed";
try {
// find the sha for the first commit in the changelog file, and then grab the corresponding entry from the changeset, yikes!
String changeLogPath = build.getRootDir().toString() + File.separator + "changelog.xml";
String sha = getCommitHash(changeLogPath);