From 86ea366846609cc33a25408bb47be953af3ff780 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 18 Mar 2021 15:45:07 -0700 Subject: [PATCH] chore: migrate to owl bot (#21) --- .../google-cloud-retail/.github/.OwlBot.yaml | 23 ++++++++ .../google-cloud-retail/.repo-metadata.json | 25 +++++---- packages/google-cloud-retail/synth.metadata | 55 ------------------- packages/google-cloud-retail/synth.py | 41 -------------- 4 files changed, 36 insertions(+), 108 deletions(-) create mode 100644 packages/google-cloud-retail/.github/.OwlBot.yaml delete mode 100644 packages/google-cloud-retail/synth.metadata delete mode 100644 packages/google-cloud-retail/synth.py diff --git a/packages/google-cloud-retail/.github/.OwlBot.yaml b/packages/google-cloud-retail/.github/.OwlBot.yaml new file mode 100644 index 00000000000..d47a2000f2b --- /dev/null +++ b/packages/google-cloud-retail/.github/.OwlBot.yaml @@ -0,0 +1,23 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/retail/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + diff --git a/packages/google-cloud-retail/.repo-metadata.json b/packages/google-cloud-retail/.repo-metadata.json index 0552dbdb30b..380ed2c6f0a 100644 --- a/packages/google-cloud-retail/.repo-metadata.json +++ b/packages/google-cloud-retail/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "retail", - "name_pretty": "Retail API", - "product_documentation": "https://cloud.google.com/recommendations/", - "client_documentation": "https://googleapis.dev/nodejs/retail/latest/", - "issue_tracker": "https://github.com/googleapis/nodejs-retail/issues", - "release_level": "ga", - "language": "nodejs", - "repo": "googleapis/nodejs-retail", - "distribution_name": "@google-cloud/retail", - "api_id": "retail.googleapis.com", - "requires_billing": true - } + "client_documentation": "https://googleapis.dev/nodejs/retail/latest/", + "api_id": "retail.googleapis.com", + "distribution_name": "@google-cloud/retail", + "release_level": "ga", + "default_version": "v2beta", + "language": "nodejs", + "name_pretty": "Retail API", + "repo": "googleapis/nodejs-retail", + "product_documentation": "https://cloud.google.com/recommendations/", + "requires_billing": true, + "name": "retail", + "issue_tracker": "https://github.com/googleapis/nodejs-retail/issues" +} diff --git a/packages/google-cloud-retail/synth.metadata b/packages/google-cloud-retail/synth.metadata deleted file mode 100644 index 89b863610a2..00000000000 --- a/packages/google-cloud-retail/synth.metadata +++ /dev/null @@ -1,55 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-retail.git", - "sha": "9ee09f8f5856eeb8e5feb1c73d91c4c96702a639" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9583f62749edab8e1a5ccd613fe59cf553c189a1" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "retail", - "apiVersion": "v2", - "language": "nodejs", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "retail", - "apiVersion": "v2alpha", - "language": "nodejs", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "retail", - "apiVersion": "v2beta", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-retail/synth.py b/packages/google-cloud-retail/synth.py deleted file mode 100644 index 732e0d2d7e0..00000000000 --- a/packages/google-cloud-retail/synth.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import subprocess -import logging - -logging.basicConfig(level=logging.DEBUG) - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ["v2","v2alpha","v2beta"] -name = 'retail' -for version in versions: - library = gapic.node_library( - name, - version, - bazel_target=f"//google/cloud/retail/{version}:retail-{version}-nodejs") - s.copy(library, excludes=["package.json","README.md"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=["v2","v2alpha","v2beta"], default_version="v2beta") -s.copy(templates, excludes=[]) - -node.postprocess_gapic_library()