Skip to content

Commit

Permalink
chore(internal/postprocessor): strip major version for scope (#7794)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss committed Apr 19, 2023
1 parent 7171608 commit 80c8439
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-go:latest
digest: sha256:f0086072a356c27ffb8bcad1bf5708ca8184b878c9dba430fb585d21d85347d3
digest: sha256:5355a8b1b748534a65070e259bfaab17df5ca2108e5484355e3a6ea9d6472b09
6 changes: 2 additions & 4 deletions internal/postprocessor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,8 @@ func (p *postProcessor) getScopesFromGoogleapisCommitHash(commitHash string) ([]
// Need import path
for inputDir, li := range p.config.GoogleapisToImportPath {
if inputDir == filepath.Dir(filePath) {
// trim prefix
scope := strings.TrimPrefix(li.ImportPath, "cloud.google.com/go/")
// trim version
scope = filepath.Dir(scope)
// trim service version
scope := filepath.Dir(li.RelPath)
if _, value := scopesMap[scope]; !value {
scopesMap[scope] = true
scopes = append(scopes, scope)
Expand Down

0 comments on commit 80c8439

Please sign in to comment.