Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 12 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,15 @@
node-version: 18
- run: npm install
- run: npm run lint
# TODO(https://github.com/googleapis/nodejs-datastore/issues/1424)
# docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# - run: npm install
# - run: npm run docs
# - uses: JustinBeckwith/linkinator-action@v1
# with:
# paths: docs/
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install
- run: npm run docs
- uses: JustinBeckwith/linkinator-action@v1
with:
paths: docs/
Comment on lines +64 to +74

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**_THIS REPOSITORY IS DEPRECATED. ALL OF ITS CONTENT AND HISTORY HAS BEEN MOVED TO [GOOGLE-CLOUD-NODE](https://github.com/googleapis/google-cloud-node/tree/main/packages/handwritten)_**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sofisl, if this package is deprecated, what would be the replacement? The link above does not point to an actual package.


[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
Expand Down
53 changes: 5 additions & 48 deletions owlbot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2021 Google LLC
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# 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
#
Expand All @@ -11,50 +11,7 @@
# 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
from synthtool import shell
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()
node.owlbot_main(templates_excludes=[
'README.md'
])
Loading
Loading