Skip to content

Commit 45123a4

Browse files
authored
chore(librarian): remove commit body from release notes (googleapis#14852)
The commit body is not needed when creating release notes. It was originally added to workaround googleapis/librarian#2234. As per googleapis/librarian#2234 (comment), we should not include the body in the release notes. Without the fix in this PR, the changelog for `googleapis-common-protos` looks like this ``` ## [1.72.0](googleapis/google-cloud-python@googleapis-common-protos-v1.71.0...googleapis-common-protos-v1.72.0) (2025-11-05) ### Features * add common_resources.proto (googleapis#14851) This PR depends on googleapis#14850 `google/cloud` was not listed as an api path for `googleapis-common-protos` for code was not being generated for https://github.com/googleapis/googleapis/blob/master/google/cloud/extended_operations.proto and https://github.com/googleapis/googleapis/blob/master/google/cloud/common_resources.proto ([e4e0e2a](googleapis@e4e0e2a)) * add field api_version to message ServiceForTransport (googleapis#14843) This PR was created locally. The reason that this could not be automated is that the current directory structure [gapic/metadata](https://github.com/googleapis/googleapis/tree/master/gapic/metadata) doesn't align with the protobuf package name [google.gapic.metadata](https://github.com/googleapis/googleapis/blob/53af3b727f84acc34e31c23f3b6e7b8aa4b7e837/gapic/metadata/gapic_metadata.proto#L18). The expected directory structure for `google.gapic.metadata` is `google/gapic/metadata`. In the `googleapis-common-protos` package, the `gencode` is in the expected location ([81812fd](googleapis@81812fd)) ``` With the fix, the changelog for `googleapis-common-protos` looks like this ``` ## [1.72.0](googleapis/google-cloud-python@googleapis-common-protos-v1.71.0...googleapis-common-protos-v1.72.0) (2025-11-05) ### Features * add common_resources.proto (googleapis#14851) ([e4e0e2a](googleapis@e4e0e2a)) * add field api_version to message ServiceForTransport (googleapis#14843) ([81812fd](googleapis@81812fd)) ```
1 parent a511d4d commit 45123a4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.generator/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,6 @@ def _process_changelog(
13391339
type_key = "type"
13401340
commit_hash_key = "commit_hash"
13411341
subject_key = "subject"
1342-
body_key = "body"
13431342
library_changes.sort(key=lambda x: x[type_key])
13441343
grouped_changes = itertools.groupby(library_changes, key=lambda x: x[type_key])
13451344

@@ -1356,7 +1355,7 @@ def _process_changelog(
13561355
for change in library_changes:
13571356
commit_link = f"([{change[commit_hash_key]}]({_REPO_URL}/commit/{change[commit_hash_key]}))"
13581357
entry_parts.append(
1359-
f"* {change[subject_key]} {change[body_key]} {commit_link}"
1358+
f"* {change[subject_key]} {commit_link}"
13601359
)
13611360

13621361
new_entry_text = "\n".join(entry_parts)

.generator/test_cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,12 +1270,12 @@ def test_process_changelog_success():
12701270
expected_result = f"""# Changelog\n[PyPI History][1]\n[1]: https://pypi.org/project/google-cloud-language/#history\n
12711271
## [1.2.3](https://github.com/googleapis/google-cloud-python/compare/google-cloud-language-v1.2.2...google-cloud-language-v1.2.3) ({current_date})\n\n
12721272
### Documentation\n
1273-
* fix typo in BranchRule comment ([9461532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/9461532e7d19c8d71709ec3b502e5d81340fb661))\n\n
1273+
* fix typo in BranchRule comment ([9461532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/9461532e7d19c8d71709ec3b502e5d81340fb661))\n\n
12741274
### Features\n
1275-
* add new UpdateRepository API This adds the ability to update a repository's properties. ([9461532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/9461532e7d19c8d71709ec3b502e5d81340fb661))\n\n
1275+
* add new UpdateRepository API ([9461532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/9461532e7d19c8d71709ec3b502e5d81340fb661))\n\n
12761276
### Bug Fixes\n
1277-
* some fix some body ([1231532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/1231532e7d19c8d71709ec3b502e5d81340fb661))
1278-
* another fix ([1241532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/1241532e7d19c8d71709ec3b502e5d81340fb661))\n
1277+
* some fix ([1231532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/1231532e7d19c8d71709ec3b502e5d81340fb661))
1278+
* another fix ([1241532e7d19c8d71709ec3b502e5d81340fb661](https://github.com/googleapis/google-cloud-python/commit/1241532e7d19c8d71709ec3b502e5d81340fb661))\n
12791279
## [1.2.2](https://github.com/googleapis/google-cloud-python/compare/google-cloud-language-v1.2.1...google-cloud-language-v1.2.2) (2025-06-11)"""
12801280
version = "1.2.3"
12811281
previous_version = "1.2.2"

0 commit comments

Comments
 (0)