Skip to content

Commit 2fe9871

Browse files
authored
Allow changelogger in other locations (#72)
1 parent 2356104 commit 2fe9871

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

changelogger/conf/defaults.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@
1515
"assets/.cl.links.jinja2"
1616
)
1717

18-
CHANGELOGGER_PATH = Path(".changelogger.yml")
18+
CHANGELOGGER_NAME = ".changelogger.yml"
19+
20+
CHANGELOGGER_PATH = (
21+
(p1 := Path(CHANGELOGGER_NAME)).exists()
22+
and p1
23+
or (p2 := Path(".changelogger/").joinpath(CHANGELOGGER_NAME)).exists()
24+
and p2
25+
or (p3 := Path(".github/").joinpath(CHANGELOGGER_NAME)).exists()
26+
and p3
27+
or p1
28+
)

0 commit comments

Comments
 (0)