From f36e717f19446231bdf00f4614814f17386fc1f1 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 22 Apr 2021 14:10:07 -0400 Subject: [PATCH] chore: fix conversion to owlbot (#463) Remove synth.py since this repo now use owlbot --- java-resourcemanager/.github/.OwlBot.yaml | 10 +-- .../.github/sync-repo-settings.yaml | 22 ++--- java-resourcemanager/{synth.py => owlbot.py} | 15 ++-- java-resourcemanager/synth.metadata | 89 +++---------------- 4 files changed, 36 insertions(+), 100 deletions(-) rename java-resourcemanager/{synth.py => owlbot.py} (63%) diff --git a/java-resourcemanager/.github/.OwlBot.yaml b/java-resourcemanager/.github/.OwlBot.yaml index 42cda440b98d..baf2b388f968 100644 --- a/java-resourcemanager/.github/.OwlBot.yaml +++ b/java-resourcemanager/.github/.OwlBot.yaml @@ -18,12 +18,12 @@ docker: deep-remove-regex: - "/grpc-google-.*/src" - "/proto-google-.*/src" -- "/google-.*/src/main/java/com/google/cloud/resourcemanager/(v.*)" +- "/google-.*/src" deep-copy-regex: - source: "/google/cloud/resourcemanager/(v.*)/.*-java/proto-google-.*/src" - dest: "/proto-google-cloud-resourcemanager-$1/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-resourcemanager-$1/src" - source: "/google/cloud/resourcemanager/(v.*)/.*-java/grpc-google-.*/src" - dest: "/grpc-google-cloud-resourcemanager-$1/src" -- source: "/google/cloud/resourcemanager/v.*/.*-java/gapic-google-.*/src" - dest: "/google-cloud-resourcemanager/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-resourcemanager-$1/src" +- source: "/google/cloud/resourcemanager/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-resourcemanager/src" diff --git a/java-resourcemanager/.github/sync-repo-settings.yaml b/java-resourcemanager/.github/sync-repo-settings.yaml index 6bddd18eac90..e100454f1290 100644 --- a/java-resourcemanager/.github/sync-repo-settings.yaml +++ b/java-resourcemanager/.github/sync-repo-settings.yaml @@ -29,16 +29,16 @@ branchProtectionRules: requiresStrictStatusChecks: false # List of required status check contexts that must pass for commits to be accepted to matching branches. requiredStatusCheckContexts: - - "dependencies (8)" - - "dependencies (11)" - - "linkage-monitor" - - "lint" - - "clirr" - - "units (7)" - - "units (8)" - - "units (11)" - - "Kokoro - Test: Integration" - - "cla/google" + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" # List of explicit permissions to add (additive only) permissionRules: - team: yoshi-admins @@ -46,4 +46,4 @@ permissionRules: - team: yoshi-java-admins permission: admin - team: yoshi-java - permission: push \ No newline at end of file + permission: push diff --git a/java-resourcemanager/synth.py b/java-resourcemanager/owlbot.py similarity index 63% rename from java-resourcemanager/synth.py rename to java-resourcemanager/owlbot.py index ea25b33a63d5..dca9d8672536 100644 --- a/java-resourcemanager/synth.py +++ b/java-resourcemanager/owlbot.py @@ -1,10 +1,10 @@ -# 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. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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, @@ -12,10 +12,13 @@ # 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 +from synthtool.languages import java -import synthtool.languages.java as java -AUTOSYNTH_MULTIPLE_COMMITS = True +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) -java.common_templates() \ No newline at end of file +s.remove_staging_dirs() +java.common_templates() diff --git a/java-resourcemanager/synth.metadata b/java-resourcemanager/synth.metadata index e0b7e506bbcc..c62935b10171 100644 --- a/java-resourcemanager/synth.metadata +++ b/java-resourcemanager/synth.metadata @@ -3,91 +3,24 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/java-resourcemanager.git", - "sha": "b3f53537ab83aed1afb065d49553649893e7f89e" + "remote": "git@github.com:googleapis/java-resourcemanager.git", + "sha": "3fd447e9149529a915fd982630056e74b0ad6216" + } + }, + { + "git": { + "name": "googleapis-gen", + "remote": "https://github.com/googleapis/googleapis-gen.git", + "sha": "32337a2c2ec4d35de81519661e279ada7e3bfcf2", + "internalRef": "369574301" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5b0e1592dd7d70b485e157ea4b3eb1704ecbd015" + "sha": "5a6f30b8bb7672cf237c4f75d5aa96bfba170e7f" } } - ], - "generatedFiles": [ - ".github/CODEOWNERS", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/blunderbuss.yml", - ".github/generated-files-bot.yml", - ".github/readme/synth.py", - ".github/release-please.yml", - ".github/snippet-bot.yml", - ".github/trusted-contribution.yml", - ".github/workflows/approve-readme.yaml", - ".github/workflows/auto-release.yaml", - ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", - ".kokoro/build.bat", - ".kokoro/build.sh", - ".kokoro/coerce_logs.sh", - ".kokoro/common.cfg", - ".kokoro/common.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/java8.cfg", - ".kokoro/continuous/readme.cfg", - ".kokoro/dependencies.sh", - ".kokoro/nightly/common.cfg", - ".kokoro/nightly/integration.cfg", - ".kokoro/nightly/java11.cfg", - ".kokoro/nightly/java7.cfg", - ".kokoro/nightly/java8-osx.cfg", - ".kokoro/nightly/java8-win.cfg", - ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/samples.cfg", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/clirr.cfg", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/dependencies.cfg", - ".kokoro/presubmit/integration.cfg", - ".kokoro/presubmit/java11.cfg", - ".kokoro/presubmit/java7.cfg", - ".kokoro/presubmit/java8-osx.cfg", - ".kokoro/presubmit/java8-win.cfg", - ".kokoro/presubmit/java8.cfg", - ".kokoro/presubmit/linkage-monitor.cfg", - ".kokoro/presubmit/lint.cfg", - ".kokoro/presubmit/samples.cfg", - ".kokoro/readme.sh", - ".kokoro/release/bump_snapshot.cfg", - ".kokoro/release/common.cfg", - ".kokoro/release/common.sh", - ".kokoro/release/drop.cfg", - ".kokoro/release/drop.sh", - ".kokoro/release/promote.cfg", - ".kokoro/release/promote.sh", - ".kokoro/release/publish_javadoc.cfg", - ".kokoro/release/publish_javadoc.sh", - ".kokoro/release/publish_javadoc11.cfg", - ".kokoro/release/publish_javadoc11.sh", - ".kokoro/release/snapshot.cfg", - ".kokoro/release/snapshot.sh", - ".kokoro/release/stage.cfg", - ".kokoro/release/stage.sh", - ".kokoro/trampoline.sh", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "codecov.yaml", - "java.header", - "license-checks.xml", - "renovate.json", - "samples/install-without-bom/pom.xml", - "samples/pom.xml", - "samples/snapshot/pom.xml", - "samples/snippets/pom.xml" ] } \ No newline at end of file