Skip to content

Commit

Permalink
Implement git branch display on docx file
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed May 31, 2024
1 parent 1106ed8 commit 68b2d7d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private PlaceHolders() {
/**
* Placeholder for the project's branch
*/
private static final String PROJECTBRANCH_PLACEHOLDER = "XX-PROJECTBRANCH-XX";
private static final String PROJECTBRANCH_PLACEHOLDER = "XX-BRANCH-XX";
/**
* Placeholder for the quality gate's anme
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ private static void replaceInParagraph(XWPFParagraph paragraph, Map<String,Strin

// construct here the new string by replacing each placeholder by its value
text = currentRun.getText(0);

pictures.clear();
for (Map.Entry<String, String> nextValue : values.entrySet()) {
key = nextValue.getKey();
Expand Down
Binary file modified src/main/resources/template/code-analysis-template.docx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/resources/template/code-analysis-template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code analysis
## XX-PROJECTNAME-XX
#### Branch XX-PROJECTBRANCH-XX
#### Branch XX-BRANCH-XX
#### Version XX-VERSION-XX

**By: XX-AUTHOR-XX**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void loadPlaceholdersMapTest(){
Map<String,String> expected = new HashMap<>();
// Fill manually the placeHolders depending on what we initialized in "CommonTest"
expected.put("XX-PROJECTNAME-XX", "CNES Report");
expected.put("XX-PROJECTBRANCH-XX", "main");
expected.put("XX-BRANCH-XX", "main");
expected.put("XX-DUPLICATION-XX", "1.0");
expected.put("XX-COMMENTDENSITY-XX", "1.0");
expected.put("XX-MAXNCLOC-XX", "unknown");
Expand Down

0 comments on commit 68b2d7d

Please sign in to comment.