Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit 6ca3ad8

Browse files
author
sowerstl
committed
Updated GitLab commit message to be more descriptive for single file changes.
1 parent 05dd51b commit 6ca3ad8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/main/java/gov/osti/services/Metadata.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ private static void processOSTIGitLab(DOECodeMetadata md) throws Exception {
19921992
}
19931993

19941994
String prefix;
1995-
String detail = fileName;
1995+
String detail = "\"" + fileName + "\"";
19961996
if (adds == 1 && updates == 0 && deletes == 0) {
19971997
prefix = "Adding";
19981998
}
@@ -2001,8 +2001,13 @@ else if (adds == 0 && updates == 1 && deletes == 0) {
20012001
}
20022002
else {
20032003
prefix = "Modifying";
2004-
detail = (adds > 0 ? "Added " + adds : "");
2005-
detail += (updates > 0 ? (StringUtils.isBlank(detail) ? "" : ", ") + "Updated " + updates : "");
2004+
2005+
String tmp = (adds == 1) ? "\"" + fileName + "\"" : String.valueOf(adds);
2006+
detail = (adds > 0 ? "Added " + tmp : "");
2007+
2008+
tmp = (updates == 1) ? "\"" + fileName + "\"" : String.valueOf(updates);
2009+
detail += (updates > 0 ? (StringUtils.isBlank(detail) ? "" : ", ") + "Updated " + tmp : "");
2010+
20062011
detail += (deletes > 0 ? (StringUtils.isBlank(detail) ? "" : ", ") + "Deleted " + deletes : "");
20072012
}
20082013

0 commit comments

Comments
 (0)