Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breaking change detector] support regex in RUN_BREAKING_CHANGES_PACKAGES #36051

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# --------------------------------------------------------------------------------------------


RUN_BREAKING_CHANGES_PACKAGES = []
RUN_BREAKING_CHANGES_PACKAGES = [
"azure-mgmt-*",
]


# See Readme for ignore format
Expand Down
3 changes: 2 additions & 1 deletion scripts/breaking_changes_checker/detect_breaking_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

import re
import ast
import os
import jsondiff
Expand Down Expand Up @@ -395,7 +396,7 @@ def main(package_name: str, target_module: str, version: str, in_venv: Union[boo
pkg_dir = os.path.abspath(args.target_package)
package_name = os.path.basename(pkg_dir)
logging.basicConfig(level=logging.INFO)
if package_name not in RUN_BREAKING_CHANGES_PACKAGES:
if package_name not in RUN_BREAKING_CHANGES_PACKAGES and not any(bool(re.findall(p, package_name)) for p in RUN_BREAKING_CHANGES_PACKAGES):
msyyc marked this conversation as resolved.
Show resolved Hide resolved
_LOGGER.info(f"{package_name} opted out of breaking changes checks. "
f"See http://aka.ms/azsdk/breaking-changes-tool to opt-in.")
exit(0)
Expand Down