fix: forbid

This commit is contained in:
zzjc1234 2024-06-18 16:40:41 +08:00 committed by Boming Zhang
parent 1b284dd04e
commit 04127c5b12
GPG Key ID: D47306D7062CDA9D
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit ff1d788beeae458682296c77ea759ad6b0313c01 Subproject commit a0a9a6a629d48179fb2647027e5fadad242b2601

View File

@ -66,7 +66,7 @@ func ForbiddenCheck(rootDir string, regexList []string, repo string, droneBranch
strings.Join(forbids, ", ") + strings.Join(forbids, ", ") +
"\n\nTo fix it, first make a backup of your repository and then run the following commands:\nfor i in " + "\n\nTo fix it, first make a backup of your repository and then run the following commands:\nfor i in " +
strings.Join(forbids, " ") + strings.Join(forbids, " ") +
fmt.Sprint("; do git filter-repo --force --invert-paths --path \\\"\\$i\\\"; done\ngit remote add origin ", fmt.Sprint("; do git filter-repo --force --invert-paths --path \"$i\"; done\ngit remote add origin ",
repo, "\ngit push --set-upstream origin ", droneBranch, " --force") repo, "\ngit push --set-upstream origin ", droneBranch, " --force")
return fmt.Errorf(message) return fmt.Errorf(message)
} }