Skip to content

Commit

Permalink
chore: migrate to owl bot (#886)
Browse files Browse the repository at this point in the history
* chore: migrate to owl bot

* chore: copy files from googleapis-gen fb91803ccef5d7c695139b22788b309e2197856b

* chore: run the post processor

* 🦉 Updates from OwlBot

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
SurferJeffAtGoogle and gcf-owl-bot[bot] authored Apr 21, 2021
1 parent ef41033 commit e7f3dbe
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 127 deletions.
26 changes: 26 additions & 0 deletions packages/google-cloud-vision/.github/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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/vision/(v.*)/.*-nodejs/(.*)
dest: /owl-bot-staging/$1/$2

begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b

17 changes: 9 additions & 8 deletions packages/google-cloud-vision/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "vision",
"name_pretty": "Google Cloud Vision API",
"product_documentation": "https://cloud.google.com/vision",
"client_documentation": "https://googleapis.dev/nodejs/vision/latest",
"issue_tracker": "https://issuetracker.google.com/savedsearches/559765",
"release_level": "ga",
"language": "nodejs",
"repo": "googleapis/nodejs-vision",
"distribution_name": "@google-cloud/vision",
"product_documentation": "https://cloud.google.com/vision",
"api_id": "vision.googleapis.com",
"client_documentation": "https://googleapis.dev/nodejs/vision/latest",
"repo": "googleapis/nodejs-vision",
"release_level": "ga",
"requires_billing": true,
"codeowner_team": "@googleapis/ml-apis"
"name_pretty": "Google Cloud Vision API",
"name": "vision",
"codeowner_team": "@googleapis/ml-apis",
"default_version": "v1p4beta1",
"language": "nodejs"
}
33 changes: 33 additions & 0 deletions packages/google-cloud-vision/owlbot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2018 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.languages.node as node
from pathlib import Path

def patch(library: Path):
client_file = library / "src/*/image_annotator_client.ts"
s.replace(client_file, '\Z',
'import {FeaturesMethod} from \'../helpers\';\n' +
'// eslint-disable-next-line @typescript-eslint/no-empty-interface\n' +
'export interface ImageAnnotatorClient extends FeaturesMethod {}\n'
)

node.owlbot_main(
staging_excludes=['src/index.ts', 'package.json'],
templates_excludes=['src/index.ts'],
patch_staging=patch
)
73 changes: 0 additions & 73 deletions packages/google-cloud-vision/synth.metadata

This file was deleted.

46 changes: 0 additions & 46 deletions packages/google-cloud-vision/synth.py

This file was deleted.

0 comments on commit e7f3dbe

Please sign in to comment.