Skip to content

Commit 57c313a

Browse files
authored
Add support for upcoming new config filename (#69)
1 parent 9bb333b commit 57c313a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47065,7 +47065,7 @@ var configSchema = object({
4706547065
"perennial-regex": string3().optional()
4706647066
}).optional()
4706747067
});
47068-
var CONFIG_FILE_NAMES = [".git-branches.toml", ".git-town.toml"];
47068+
var CONFIG_FILE_NAMES = [".git-branches.toml", ".git-town.toml", "git-town.toml"];
4706947069
var configFile;
4707047070
CONFIG_FILE_NAMES.forEach((file) => {
4707147071
try {
@@ -47077,7 +47077,7 @@ CONFIG_FILE_NAMES.forEach((file) => {
4707747077
var parsed = configSchema.safeParse(toml.parse(configFile ?? ""));
4707847078
if (!parsed.success) {
4707947079
core4.warning(
47080-
"Failed to parse Git Town config. If this is a mistake, ensure that `.git-branches.toml`/`.git-town.toml` is valid."
47080+
"Failed to parse Git Town config. If this is a mistake, ensure that `.git-branches.toml`/`.git-town.toml`/`git-town.toml` is valid."
4708147081
);
4708247082
}
4708347083
var config = configFile && parsed.success ? parsed.data : void 0;

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const configSchema = object({
1515

1616
export type Config = z.infer<typeof configSchema>
1717

18-
const CONFIG_FILE_NAMES = ['.git-branches.toml', '.git-town.toml']
18+
const CONFIG_FILE_NAMES = ['.git-branches.toml', '.git-town.toml', 'git-town.toml']
1919
let configFile: string | undefined
2020

2121
CONFIG_FILE_NAMES.forEach((file) => {
@@ -30,7 +30,7 @@ const parsed = configSchema.safeParse(toml.parse(configFile ?? ''))
3030

3131
if (!parsed.success) {
3232
core.warning(
33-
'Failed to parse Git Town config. If this is a mistake, ensure that `.git-branches.toml`/`.git-town.toml` is valid.'
33+
'Failed to parse Git Town config. If this is a mistake, ensure that `.git-branches.toml`/`.git-town.toml`/`git-town.toml` is valid.'
3434
)
3535
}
3636

0 commit comments

Comments
 (0)