Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

chore: migrate to owl bot #17

Merged
merged 4 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: migrate to owl bot
  • Loading branch information
parthea committed May 11, 2021
commit 128104225c4c2a51416f32104531be2806569bfe
4 changes: 4 additions & 0 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docker:
digest: sha256:457583330eec64daa02aeb7a72a04d33e7be2428f646671ce4045dcbc0191b1e
image: gcr.io/repo-automation-bots/owlbot-python:latest

26 changes: 26 additions & 0 deletions .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-python:latest

deep-remove-regex:
- /owl-bot-staging

deep-copy-regex:
- source: /google/cloud/apigateway/(v.*)/.*-py/(.*)
dest: /owl-bot-staging/$1/$2

begin-after-commit-hash: ee56c3493ec6aeb237ff515ecea949710944a20f

21 changes: 5 additions & 16 deletions synth.py → owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,15 @@
import synthtool.gcp as gcp
from synthtool.languages import python

gapic = gcp.GAPICBazel()
common = gcp.CommonTemplates()

versions = [
"v1"

] # add new versions at the end of the list

# ----------------------------------------------------------------------------
# Generate apigateway GAPIC layer
# ----------------------------------------------------------------------------
for version in versions:
library = gapic.py_library(
service="apigateway",
version=version,
bazel_target=f"//google/cloud/apigateway/{version}:google-cloud-apigateway-{version}-py",
)
default_version = "v1"

for library in s.get_staging_dirs(default_version):
s.move(library, excludes=["setup.py", "README.rst", "docs/index.rst"])

s.remove_staging_dirs()

# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
Expand All @@ -52,4 +41,4 @@
templated_files, excludes=excludes
)

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
s.shell.run(["nox", "-s", "blacken"], hide_output=False)
140 changes: 0 additions & 140 deletions synth.metadata

This file was deleted.