Skip to content

Commit 56f3304

Browse files
authored
Merge pull request kubernetes#120822 from akhilerm/change-from-deprecated-fields
update rules to switch from deprecated dir field
2 parents c9bd841 + 2ce4f85 commit 56f3304

File tree

2 files changed

+298
-146
lines changed

2 files changed

+298
-146
lines changed

hack/verify-publishing-bot.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ def main():
8080
continue
8181

8282
for item in rule["branches"]:
83-
if not item["source"]["dir"].endswith(rule["destination"]):
83+
if "dir" in item["source"]:
84+
raise Exception("use of deprecated `dir` field in rules for `%s`" % (rule["destination"]))
85+
if len(item["source"]["dirs"]) > 1:
86+
raise Exception("cannot have more than one directory (`%s`) per source branch `%s` of `%s`" %
87+
(item["source"]["dirs"], item["source"]["branch"], rule["destination"])
88+
)
89+
if not item["source"]["dirs"][0].endswith(rule["destination"]):
8490
raise Exception("copy/paste error `%s` refers to `%s`" % (rule["destination"],item["source"]["dir"]))
8591

8692
if branch["name"] != "master":

0 commit comments

Comments
 (0)