Skip to content

Commit

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

* chore: copy files from googleapis-gen eebcfa346c9963da765cd71722c40e04dc3621dd

* chore: run the post processor

* 🦉 Updates from OwlBot

* chore: update post processor docker image

* 🦉 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 May 27, 2021
1 parent ad5ca9d commit 120e62a
Show file tree
Hide file tree
Showing 19 changed files with 1,315 additions and 1,537 deletions.
26 changes: 26 additions & 0 deletions packages/google-cloud-datacatalog/.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/datacatalog/(v.*)/.*-nodejs/(.*)
dest: /owl-bot-staging/$1/$2

begin-after-commit-hash: eebcfa346c9963da765cd71722c40e04dc3621dd

13 changes: 7 additions & 6 deletions packages/google-cloud-datacatalog/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"default_version": "v1",
"release_level": "ga",
"client_documentation": "https://googleapis.dev/nodejs/datacatalog/latest",
"name": "datacatalog",
"name_pretty": "Data Catalog",
"product_documentation": "https://cloud.google.com/data-catalog/",
"client_documentation": "https://googleapis.dev/nodejs/datacatalog/latest",
"issue_tracker": "",
"release_level": "ga",
"language": "nodejs",
"repo": "googleapis/nodejs-datacatalog",
"distribution_name": "@google-cloud/datacatalog",
"language": "nodejs",
"api_id": "datacatalog.googleapis.com",
"repo": "googleapis/nodejs-datacatalog",
"name_pretty": "Data Catalog",
"issue_tracker": "",
"requires_billing": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,11 @@
"""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 logging

logging.basicConfig(level=logging.DEBUG)

AUTOSYNTH_MULTIPLE_COMMITS = True


# Run the gapic generator
gapic = gcp.GAPICBazel()
name = 'datacatalog'
versions = ['v1', 'v1beta1']
for version in versions:
library = gapic.node_library(name, version)
s.copy(library, excludes=[
node.owlbot_main(staging_excludes=[
'README.md', 'linkinator.config.json', '.mocharc.json', 'package.json'])

# Copy common templates
common_templates = gcp.CommonTemplates()
templates = common_templates.node_library(
source_location='build/src', versions=versions, default_version='v1')
s.copy(templates, excludes=[])

# TODO: Remove the following replace once Datacatalog is ready to release a break change
# Users should use beta Client with explicitly specify the beta version
# Add beta version PolicyTagManagerClient, PolicyTagManagerSerializationClient to export
Expand All @@ -50,5 +31,3 @@
type PolicyTagManagerSerializationClient = v1beta1.PolicyTagManagerSerializationClient;
export {v1, v1beta1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient};
export default {v1, v1beta1, DataCatalogClient, PolicyTagManagerClient, PolicyTagManagerSerializationClient};""")

node.postprocess_gapic_library()
9 changes: 5 additions & 4 deletions packages/google-cloud-datacatalog/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,28 @@
// ** https://github.com/googleapis/synthtool **
// ** All changes to this file may be overwritten. **

import * as v1 from './v1';
import * as v1beta1 from './v1beta1';
import * as v1 from './v1';

const DataCatalogClient = v1.DataCatalogClient;
type DataCatalogClient = v1.DataCatalogClient;
const PolicyTagManagerClient = v1.PolicyTagManagerClient;
type PolicyTagManagerClient = v1.PolicyTagManagerClient;
const PolicyTagManagerSerializationClient =
v1.PolicyTagManagerSerializationClient;
type PolicyTagManagerSerializationClient = v1.PolicyTagManagerSerializationClient;
type PolicyTagManagerSerializationClient =
v1.PolicyTagManagerSerializationClient;

export {
v1,
v1beta1,
v1,
DataCatalogClient,
PolicyTagManagerClient,
PolicyTagManagerSerializationClient,
};
export default {
v1,
v1beta1,
v1,
DataCatalogClient,
PolicyTagManagerClient,
PolicyTagManagerSerializationClient,
Expand Down
Loading

0 comments on commit 120e62a

Please sign in to comment.