Skip to content

Commit

Permalink
feat: skip build only commit (#2555)
Browse files Browse the repository at this point in the history
In this PR:
- When generate pull request description, do not include a commit that
only changes `BUILD.bazel`.
  • Loading branch information
JoeWang1127 authored Mar 12, 2024
1 parent 5f2d4e7 commit 180c8a9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 5 deletions.
6 changes: 3 additions & 3 deletions library_generation/generate_pr_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def __get_commit_messages(
def __filter_qualified_commit(paths: Dict[str, str], commit: Commit) -> (Commit, str):
"""
Returns a tuple of a commit and libray_name.
A qualified commit means at least one file changes in that commit is
within the versioned proto_path in paths.
A qualified commit means at least one file, excluding BUILD.bazel, changes
in that commit is within the versioned proto_path in paths.
:param paths: a mapping from versioned proto_path to library_name.
:param commit: a commit under consideration.
Expand All @@ -158,7 +158,7 @@ def __filter_qualified_commit(paths: Dict[str, str], commit: Commit) -> (Commit,
"""
for file in commit.stats.files.keys():
versioned_proto_path = find_versioned_proto_path(file)
if versioned_proto_path in paths:
if versioned_proto_path in paths and (not file.endswith("BUILD.bazel")):
return commit, paths[versioned_proto_path]
return ()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gapic_generator_version: 2.37.0
protobuf_version: 25.2
googleapis_commitish: 9868a57470a969ffa1d21194a5c05d7a6e4e98cc
googleapis_commitish: 4ce0ff67a3d4509be641cbe47a35844ddc1268fc
owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409
synthtool_commitish: 5e1fb2032fa44bc170677b38713023b4fec51a4e
template_excludes:
Expand Down Expand Up @@ -48,3 +48,11 @@ libraries:
- proto_path: google/cloud/alloydb/connectors/v1
- proto_path: google/cloud/alloydb/connectors/v1alpha
- proto_path: google/cloud/alloydb/connectors/v1beta

- api_shortname: cloudcontrolspartner
name_pretty: Cloud Controls Partner API
product_documentation: https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners
api_description: Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering.
GAPICs:
- proto_path: google/cloud/cloudcontrolspartner/v1
- proto_path: google/cloud/cloudcontrolspartner/v1beta
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
This pull request is generated with proto changes between googleapis commit a17d4caf184b050d50cacf2b0d579ce72c31ce74 (exclusive) and 9868a57470a969ffa1d21194a5c05d7a6e4e98cc (inclusive).
This pull request is generated with proto changes between googleapis commit a17d4caf184b050d50cacf2b0d579ce72c31ce74 (exclusive) and 4ce0ff67a3d4509be641cbe47a35844ddc1268fc (inclusive).
Qualified commits are:
[googleapis/googleapis@7659dd2](https://github.com/googleapis/googleapis/commit/7659dd2244563fd902b681bdcadbe5385b8d3462)
[googleapis/googleapis@05d889e](https://github.com/googleapis/googleapis/commit/05d889e7dfe087fc2ddc9de9579f01d4e1c2f35e)
[googleapis/googleapis@aa16fda](https://github.com/googleapis/googleapis/commit/aa16fdad909bc33e2d4ff04cfde56a46d0e52b13)
[googleapis/googleapis@0733fdb](https://github.com/googleapis/googleapis/commit/0733fdb5f745192f9f3c95f8d08039286567cbcc)
[googleapis/googleapis@9e35c62](https://github.com/googleapis/googleapis/commit/9e35c620157d7b11cb5b2e5d0249c5caaee824f3)
[googleapis/googleapis@36dedd0](https://github.com/googleapis/googleapis/commit/36dedd0d9020c19d1c8259003c2fe9656ada7471)
BEGIN_NESTED_COMMIT
docs: [cloudcontrolspartner] update documentation URL

PiperOrigin-RevId: 612723053

END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
feat: [cloudcontrolspartner] added CloudControlsPartner API

PiperOrigin-RevId: 612632640

END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
feat: [alloydb] support for obtaining the public IP address of an Instance
feat: [alloydb] support for getting PSC DNS name from the GetConnectionInfo API
Expand All @@ -18,6 +34,21 @@ feat: [alloydb] support for getting PSC DNS name from the GetConnectionInfo API

PiperOrigin-RevId: 610415824

END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
docs: [cloudcontrolspartner] Updated comment for method `ListCustomers` in service `CloudControlsPartnerCore`
docs: [cloudcontrolspartner] Updated comment for field `location` in message `.google.cloud.cloudcontrolspartner.v1beta.Workload`
docs: [cloudcontrolspartner] Updated a comment for field `partner_project_id` in message `.google.cloud.cloudcontrolspartner.v1beta.Partner`
docs: [cloudcontrolspartner] Updated documentation URL

PiperOrigin-RevId: 609026905

END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
feat: [cloudcontrolspartner] added CloudControlsPartner API

PiperOrigin-RevId: 606720708

END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
feat: Regenerate with the Java code generator (gapic-generator-java) v2.37.0
Expand Down

0 comments on commit 180c8a9

Please sign in to comment.