diff --git a/internal/postprocessor/main.go b/internal/postprocessor/main.go index 97a9fbdaaa62..c8a8cbaa1d68 100644 --- a/internal/postprocessor/main.go +++ b/internal/postprocessor/main.go @@ -499,7 +499,7 @@ func (p *postProcessor) processCommit(title, body string) (string, string, error // When OwlBot generates the commit body, after commit titles it provides 'Source-Link's. // The source-link pointing to the googleapis/googleapis repo commit allows us to extract // hash and find files changed in order to identify the commit's scope. - if strings.Contains(line, "googleapis/googleapis/") { + if strings.HasPrefix(line, "Source-Link") && strings.Contains(line, "googleapis/googleapis/") { hash := extractHashFromLine(line) scopes, err := p.getScopesFromGoogleapisCommitHash(hash) if err != nil { diff --git a/internal/postprocessor/testdata/nested-commits.input b/internal/postprocessor/testdata/nested-commits.input index 272829e8d9ea..2d5a403df2c5 100644 --- a/internal/postprocessor/testdata/nested-commits.input +++ b/internal/postprocessor/testdata/nested-commits.input @@ -27,4 +27,17 @@ Source-Link: https://togithub.com/googleapis/googleapis/commit/488a4bdeebf9c7f50 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5b3d3a550015e9367ad13ee5f9febe0c3f84cf33 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiNWIzZDNhNTUwMDE1ZTkzNjdhZDEzZWU1ZjlmZWJlMGMzZjg0Y2YzMyJ9 +END_NESTED_COMMIT + +BEGIN_NESTED_COMMIT +fix(datacatalog): Change field behavior of the property "name" to IDENTIFIER + +The solution follows guidelines from https://google.aip.dev/203#identifier and https://github.com/googleapis/googleapis/blob/master/google/api/field_behavior.proto#L91-L103. + +PiperOrigin-RevId: 596643040 + +Source-Link: https://togithub.com/googleapis/googleapis/commit/3c84a3ca7d480cb6e09dc1e8f1bc4a77d03cac82 + +Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4c4a9f43f4a4f7d87c931c121e0bd0fbd6392468 +Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGM0YTlmNDNmNGE0ZjdkODdjOTMxYzEyMWUwYmQwZmJkNjM5MjQ2OCJ9 END_NESTED_COMMIT \ No newline at end of file diff --git a/internal/postprocessor/testdata/nested-commits.output b/internal/postprocessor/testdata/nested-commits.output index 0a7506914337..79a2a3b26aed 100644 --- a/internal/postprocessor/testdata/nested-commits.output +++ b/internal/postprocessor/testdata/nested-commits.output @@ -26,4 +26,16 @@ Source-Link: https://togithub.com/googleapis/googleapis/commit/488a4bdeebf9c7f50 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5b3d3a550015e9367ad13ee5f9febe0c3f84cf33 Copy-Tag: eyJwIjoiamF2YS1iYXRjaC8uT3dsQm90LnlhbWwiLCJoIjoiNWIzZDNhNTUwMDE1ZTkzNjdhZDEzZWU1ZjlmZWJlMGMzZjg0Y2YzMyJ9 +END_NESTED_COMMIT +BEGIN_NESTED_COMMIT +fix(datacatalog): Change field behavior of the property "name" to IDENTIFIER + +The solution follows guidelines from https://google.aip.dev/203#identifier and https://github.com/googleapis/googleapis/blob/master/google/api/field_behavior.proto#L91-L103. + +PiperOrigin-RevId: 596643040 + +Source-Link: https://togithub.com/googleapis/googleapis/commit/3c84a3ca7d480cb6e09dc1e8f1bc4a77d03cac82 + +Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4c4a9f43f4a4f7d87c931c121e0bd0fbd6392468 +Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGM0YTlmNDNmNGE0ZjdkODdjOTMxYzEyMWUwYmQwZmJkNjM5MjQ2OCJ9 END_NESTED_COMMIT \ No newline at end of file