Skip to content

Commit edf7e29

Browse files
committed
feat: Support per repo denylist for tagging.
Towards b/394214660
1 parent 1a23d52 commit edf7e29

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: autorelease/tag.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
"dotnet",
2525
]
2626

27+
# This is only used in the autorelease/tag workflows.
28+
# Direct, explicit triggering on repos in this list is still possible.
29+
REPO_DENYLIST = [
30+
"googleapis/google-cloudevents-dotnet",
31+
]
32+
2733

2834
ORGANIZATIONS_TO_SCAN = ["googleapis", "GoogleCloudPlatform"]
2935

@@ -48,16 +54,24 @@ def process_issue(
4854
# is necessary because github gives us back an issue object, but it
4955
# doesn't contain all of the PR info.
5056
pull = gh.get_url(issue["pull_request"]["url"])
57+
repo_full_name = pull["base"]["repo"]["full_name"]
5158

5259
# Determine language.
53-
lang = common.guess_language(gh, pull["base"]["repo"]["full_name"])
60+
lang = common.guess_language(gh, repo_full_name)
5461

5562
# As part of the migration to release-please tagging, cross-reference the
5663
# language against an allowlist to allow migrating language-by-language.
5764
if lang not in LANGUAGE_ALLOWLIST:
5865
result.skipped = True
5966
result.print(f"Language {lang} not in allowlist, skipping.")
6067
return
68+
# As part of the migration to release-please tagging, cross-reference the
69+
# repository against a denylist to allow migrating repo-by-repo.
70+
for denied_repo in REPO_DENYLIST:
71+
if denied_repo == repo_full_name:
72+
result.skipped = True
73+
result.print(f"Repo {denied_repo} in denylist, skipping.")
74+
return
6175

6276
# Before doing any processing, check to make sure the PR was actually merged.
6377
# "closed" PRs can be merged or just closed without merging.

0 commit comments

Comments
 (0)