Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeWang1127 committed Jun 26, 2024
1 parent 0ebbf03 commit fd7318f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library_generation/model/config_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,19 @@ def __create_qualified_commit(
:return: qualified commits.
"""
libraries = set()
for file, changes in commit.stats.files.items():
versioned_proto_path = find_versioned_proto_path(file)
for file_path, changes in commit.stats.files.items():
versioned_proto_path = find_versioned_proto_path(file_path)
if versioned_proto_path in proto_paths:
if (
file.endswith("BUILD.bazel")
file_path.endswith("BUILD.bazel")
# Qualify a commit if the commit only added BUILD.bazel
# because it's very unlikely that a commit added BUILD.bazel
# without adding proto files. Therefore, the commit is
# qualified duo to the proto change eventually.
and (not ConfigChange.__is_added(changes))
and (
not ConfigChange.__is_qualified_build_change(
commit=commit, build_file_path=file
commit=commit, build_file_path=file_path
)
)
):
Expand Down

0 comments on commit fd7318f

Please sign in to comment.