forked from googleapis/nodejs-datastore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to owl bot (googleapis#834)
* chore: migrate to owl bot * chore: copy files from googleapis-gen fb91803ccef5d7c695139b22788b309e2197856b * 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
1 parent
0dee08a
commit c27bc98
Showing
19 changed files
with
250 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
docker: | ||
digest: sha256:f556e6e7be625deb1b2429fe608df27be57185c3e6b7d39ee0059f1609f17530 | ||
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 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/datastore/(v.*)/.*-nodejs/(.*) | ||
dest: /owl-bot-staging/$1/$2 | ||
- source: /google/datastore/(admin/v.*)/.*-nodejs/(.*) | ||
dest: /owl-bot-staging/$1/$2 | ||
|
||
begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
generatedFiles: | ||
- path: '.kokoro/**' | ||
message: '`.kokoro` files are templated and should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' | ||
- path: '.github/CODEOWNERS' | ||
message: 'CODEOWNERS should instead be modified via the `codeowner_team` property in .repo-metadata.json' | ||
- path: '.github/workflows/**' | ||
message: '`.github/workflows` (GitHub Actions) should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' | ||
- path: '.github/generated-files-bot.+(yml|yaml)' | ||
message: '`.github/generated-files-bot.(yml|yaml)` should be updated in [`synthtool`](https://github.com/googleapis/synthtool)' | ||
- path: 'README.md' | ||
message: '`README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' | ||
- path: 'samples/README.md' | ||
message: '`samples/README.md` is managed by [`synthtool`](https://github.com/googleapis/synthtool). However, a partials file can be used to update the README, e.g.: https://github.com/googleapis/nodejs-storage/blob/master/.readme-partials.yaml' | ||
ignoreAuthors: | ||
- 'gcf-owl-bot[bot]' | ||
- 'yoshi-automation' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# 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 | ||
import synthtool.gcp as gcp | ||
import synthtool.languages.node as node | ||
import logging | ||
from pathlib import Path | ||
from synthtool import _tracked_paths | ||
import shutil | ||
|
||
logging.basicConfig(level=logging.DEBUG) | ||
|
||
staging = Path("owl-bot-staging") | ||
|
||
if staging.is_dir(): | ||
logging.info(f"Copying files from staging directory ${staging}.") | ||
|
||
# Copy the datastore library. | ||
for version in ['v1']: | ||
library = staging / version | ||
_tracked_paths.add(library) | ||
s.copy([library],excludes=[ | ||
'package.json', 'README.md', 'src/index.ts', 'src/v1/index.ts']) | ||
|
||
# Copy the admin library. | ||
for version in ['v1']: | ||
library = staging / 'admin' / version | ||
_tracked_paths.add(library) | ||
s.copy([library],excludes=[ | ||
'package.json', 'README.md', 'src/index.ts', 'src/v1/index.ts', 'tsconfig.json', 'tslint.json', | ||
'system-test/fixtures/sample/src/index.ts', 'system-test/fixtures/sample/src/index.js', | ||
'.jsdoc.js', 'webpack.config.js']) | ||
|
||
# Patch the code. | ||
system_test_files = ['system-test/fixtures/sample/src/index.ts', 'system-test/fixtures/sample/src/index.js'] | ||
for file in system_test_files: | ||
s.replace(file, 'DatastoreClient', 'Datastore') | ||
s.replace(file, 'client.close', '// client.close'); # does not work with the manual layer | ||
|
||
# The staging directory should never be merged into the main branch. | ||
shutil.rmtree(staging) | ||
|
||
common_templates = gcp.CommonTemplates() | ||
templates = common_templates.node_library(source_location="build/src") | ||
s.copy(templates) | ||
|
||
node.postprocess_gapic_library_hermetic() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.