dependency-update-tool: detect GitLab Renovate config files (#3823)

also organize the list in order of appearance on website.
this makes it easier to compare.

Signed-off-by: Spencer Schrock <sschrock@google.com>
This commit is contained in:
Spencer Schrock 2024-01-29 10:05:26 -08:00 committed by GitHub
parent 3b948257fc
commit 301208ce76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 3 deletions

View File

@ -92,9 +92,16 @@ var checkDependencyFileExists fileparser.DoWhileTrueOnFilename = func(name strin
},
})
// https://docs.renovatebot.com/configuration-options/
case ".github/renovate.json", ".github/renovate.json5", ".renovaterc.json", "renovate.json",
"renovate.json5", ".renovaterc":
// https://docs.renovatebot.com/configuration-options/
case "renovate.json",
"renovate.json5",
".github/renovate.json",
".github/renovate.json5",
".gitlab/renovate.json",
".gitlab/renovate.json5",
".renovaterc",
".renovaterc.json",
".renovaterc.json5":
*ptools = append(*ptools, checker.Tool{
Name: "RenovateBot",
URL: asPointer("https://github.com/renovatebot/renovate"),

View File

@ -63,6 +63,18 @@ func Test_checkDependencyFileExists(t *testing.T) {
want: true,
wantErr: false,
},
{
name: ".gitlab/renovate.json",
path: ".gitlab/renovate.json",
want: true,
wantErr: false,
},
{
name: ".gitlab/renovate.json5",
path: ".gitlab/renovate.json5",
want: true,
wantErr: false,
},
{
name: ".renovaterc.json",
path: ".renovaterc.json",