Commit 4c7fd88
fix: correct deep-remove and deep-preserve regexes (#2572)
In this PR we fix the `deep-remove` and `deep-preserve` regexes in
`.OwlBot.yaml` files in the monorepo by creating a temporary
`.OwlBot.hermetic.yaml` with the corrected paths.
### Why?
Because the paths specified in `deep-remove-regex` and
`deep-preserve-regex` [start from the library
name](https://github.com/googleapis/google-cloud-java/blob/14f7146c98fdf03de2f113215e03347a21e83f9a/java-alloydb/.OwlBot.yaml#L17),
so if we run `copy-code` from inside a library, these regexes won't
match any files.
### What about deep-copy?
We don't need to correct the library path because `copy-code` sends the
files from `googleapis-gen` (or our built temp folder in our case) to
the `owl-bot-staging` folder. These regexes don't deal with the
monorepo, they deal with the source repo, which for our case is the temp
folder we build after calling generate_library. This is why `deep-copy`
was always being "respected".
### Proof
After running `python generate_repo.py generate --generation-config-yaml
google-cloud-java/generation_config.yaml --repository-path
google-cloud-java --target-library-api-shortname merchantapi &> out`, we
get

---------
Co-authored-by: Joe Wang <[email protected]>1 parent 993f5ac commit 4c7fd88
1 file changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
66 | 81 | | |
67 | 82 | | |
68 | 83 | | |
| |||
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
112 | 132 | | |
113 | 133 | | |
114 | 134 | | |
| |||
0 commit comments