Skip to content

Commit e63f2fd

Browse files
committed
fix #3 Update default section titles and add new "Documentation" section
Revised default YAML and tests to reflect updated section titles: "New Features", "Bug Fixes", and added a new "Documentation" section. Updated related resources and README for consistency.
1 parent af92183 commit e63f2fd

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

README.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@ If `sections` isn't set, the following default is used:
4141

4242
[source,yaml]
4343
----
44+
ghrnc:
4445
sections:
45-
- title: "Enhancements"
46+
- title: ":star: New Features"
4647
labels: ["enhancement"]
47-
- title: "Bugs"
48+
- title: ":lady_beetle: Bug Fixes"
4849
labels: ["bug"]
50+
- title: ":notebook_with_decorative_cover: Documentation"
51+
labels: ["documentation"]
4952
----
5053

5154
== Running Standalone
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
ghrnc:
22
sections:
3-
- title: "Enhancements"
3+
- title: ":star: New Features"
44
labels: ["enhancement"]
5-
- title: "Bugs"
6-
labels: ["bug"]
5+
- title: ":lady_beetle: Bug Fixes"
6+
labels: ["bug"]
7+
- title: ":notebook_with_decorative_cover: Documentation"
8+
labels: ["documentation"]

src/test/java/codes/thischwa/ghrnc/YamlUtilTest.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@ void testCommonConfig() {
1616
Conf result = yamlUtil.readInputStream(this.getClass().getResourceAsStream("/ghrnc.yml"));
1717
assertNotNull(result);
1818
Ghrnc config = result.ghrnc();
19-
check(config, true);
19+
20+
assertEquals("owner/project", config.repo());
21+
assertEquals("ghp_abcdefghijklmnopqrstxyz0123456789bla", config.githubToken());
22+
23+
assertEquals("Enhancements", config.sections().get(0).getTitle());
24+
assertTrue(config.sections().get(0).getLabels().contains("enhancement"));
25+
assertEquals("Bugs", config.sections().get(1).getTitle());
26+
assertTrue(config.sections().get(1).getLabels().contains("bug"));
27+
assertEquals("Improvements", config.sections().get(2).getTitle());
28+
assertTrue(config.sections().get(2).getLabels().contains("improvement"));
2029
}
2130

2231
@Test
@@ -27,20 +36,13 @@ void testMissingSections() {
2736
assertNotNull(result);
2837
Ghrnc config = result.ghrnc();
2938
assertEquals("owner/project", config.repo());
30-
check(config, false);
31-
}
3239

33-
private static void check(Ghrnc config, boolean checkImprovements) {
3440
assertEquals("owner/project", config.repo());
3541
assertEquals("ghp_abcdefghijklmnopqrstxyz0123456789bla", config.githubToken());
3642

37-
assertEquals("Enhancements", config.sections().get(0).getTitle());
43+
assertEquals(":star: New Features", config.sections().get(0).getTitle());
3844
assertTrue(config.sections().get(0).getLabels().contains("enhancement"));
39-
assertEquals("Bugs", config.sections().get(1).getTitle());
45+
assertEquals(":lady_beetle: Bug Fixes", config.sections().get(1).getTitle());
4046
assertTrue(config.sections().get(1).getLabels().contains("bug"));
41-
if (checkImprovements) {
42-
assertEquals("Improvements", config.sections().get(2).getTitle());
43-
assertTrue(config.sections().get(2).getLabels().contains("improvement"));
44-
}
4547
}
4648
}

0 commit comments

Comments
 (0)