From 670ee8a4d5818a5b5deea85e71e30205bcc0b616 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 23 Sep 2021 10:55:25 -0700 Subject: [PATCH] chore: convert to owlbot --- .github/.OwlBot.lock.yaml | 3 +++ synth.py => .github/.OwlBot.yaml | 17 +++------------- owlbot.py | 34 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 .github/.OwlBot.lock.yaml rename synth.py => .github/.OwlBot.yaml (60%) create mode 100644 owlbot.py diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 000000000..ec24ba682 --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:db1616f2f70823d8381d859835229e04371d14f59ac78063c5af73c55c3fffbb + image: gcr.io/repo-automation-bots/owlbot-java:latest diff --git a/synth.py b/.github/.OwlBot.yaml similarity index 60% rename from synth.py rename to .github/.OwlBot.yaml index 26c4d5bf3..8c5f03b4d 100644 --- a/synth.py +++ b/.github/.OwlBot.yaml @@ -1,5 +1,4 @@ - -# Copyright 2019 Google LLC +# 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. @@ -12,16 +11,6 @@ # 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.languages.java as java -java.common_templates(excludes=[ - "README.md", - "java.header", - "checkstyle.xml", - "renovate.json", - "license-checks.xml", - ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", -]) +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 000000000..75a649885 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,34 @@ +# 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 +# +# https://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. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates( + excludes=[ + "README.md", + "java.header", + "checkstyle.xml", + "renovate.json", + "license-checks.xml", + ".github/workflows/ci.yaml", + ".github/workflows/samples.yaml", + ] +)