From c2153aa9c4dd43230796001b8cee091c1b567843 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 11:19:21 -0800 Subject: [PATCH] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- .../.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 4 +- .../google-cloud-essentialcontacts/README.md | 21 ++- .../package.json | 13 +- .../samples/README.md | 138 +++++++++++++++++- .../src/index.ts | 2 +- release-please-config.json | 3 +- 10 files changed, 165 insertions(+), 27 deletions(-) rename packages/google-cloud-essentialcontacts/{.github => }/.OwlBot.yaml (78%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c38b0a70276..eadfa61d836 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -18,6 +18,7 @@ "packages/google-cloud-dataproc": "4.1.1", "packages/google-cloud-deploy": "2.2.2", "packages/google-cloud-discoveryengine": "0.2.0", + "packages/google-cloud-essentialcontacts": "2.0.2", "packages/google-cloud-gkeconnect-gateway": "2.0.5", "packages/google-cloud-gkemulticloud": "0.1.4", "packages/google-cloud-language": "5.1.2", diff --git a/packages/google-cloud-essentialcontacts/.github/.OwlBot.yaml b/packages/google-cloud-essentialcontacts/.OwlBot.yaml similarity index 78% rename from packages/google-cloud-essentialcontacts/.github/.OwlBot.yaml rename to packages/google-cloud-essentialcontacts/.OwlBot.yaml index f84e2f5414d..424ed4e3b64 100644 --- a/packages/google-cloud-essentialcontacts/.github/.OwlBot.yaml +++ b/packages/google-cloud-essentialcontacts/.OwlBot.yaml @@ -11,12 +11,10 @@ # 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/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/essentialcontacts/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/essentialcontacts/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-essentialcontacts/$1 diff --git a/packages/google-cloud-essentialcontacts/.mocharc.js b/packages/google-cloud-essentialcontacts/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-essentialcontacts/.mocharc.js +++ b/packages/google-cloud-essentialcontacts/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-essentialcontacts/.prettierrc.js b/packages/google-cloud-essentialcontacts/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-essentialcontacts/.prettierrc.js +++ b/packages/google-cloud-essentialcontacts/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-essentialcontacts/.repo-metadata.json b/packages/google-cloud-essentialcontacts/.repo-metadata.json index e3d0a77ed9a..eea5641345a 100644 --- a/packages/google-cloud-essentialcontacts/.repo-metadata.json +++ b/packages/google-cloud-essentialcontacts/.repo-metadata.json @@ -7,8 +7,8 @@ "language": "nodejs", "api_id": "essentialcontacts.googleapis.com", "distribution_name": "@google-cloud/essential-contacts", - "repo": "googleapis/nodejs-essential-contacts", - "issue_tracker": "https://github.com/googleapis/nodejs-essential-contacts/issues", + "repo": "googleapis/google-cloud-node", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "name_pretty": "Essential Contacts API", "default_version": "v1", "api_shortname": "essentialcontacts", diff --git a/packages/google-cloud-essentialcontacts/README.md b/packages/google-cloud-essentialcontacts/README.md index 8a79d9d126f..d6bf52f6201 100644 --- a/packages/google-cloud-essentialcontacts/README.md +++ b/packages/google-cloud-essentialcontacts/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Essential Contacts API: Node.js Client](https://github.com/googleapis/nodejs-essential-contacts) +# [Essential Contacts API: Node.js Client](https://github.com/googleapis/google-cloud-node) [![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/essential-contacts.svg)](https://www.npmjs.org/package/@google-cloud/essential-contacts) @@ -14,11 +14,11 @@ Essential contacts client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-essential-contacts/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-essentialcontacts/CHANGELOG.md). * [Essential Contacts API Node.js Client API Reference][client-docs] * [Essential Contacts API Documentation][product-docs] -* [github.com/googleapis/nodejs-essential-contacts](https://github.com/googleapis/nodejs-essential-contacts) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-essentialcontacts](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-essentialcontacts) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -84,11 +84,18 @@ listContacts(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-essential-contacts/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-essential-contacts/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-essential-contacts&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Essential_contacts_service.compute_contacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.compute_contacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.compute_contacts.js,samples/README.md) | +| Essential_contacts_service.create_contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.create_contact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.create_contact.js,samples/README.md) | +| Essential_contacts_service.delete_contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.delete_contact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.delete_contact.js,samples/README.md) | +| Essential_contacts_service.get_contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.get_contact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.get_contact.js,samples/README.md) | +| Essential_contacts_service.list_contacts | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.list_contacts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.list_contacts.js,samples/README.md) | +| Essential_contacts_service.send_test_message | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.send_test_message.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.send_test_message.js,samples/README.md) | +| Essential_contacts_service.update_contact | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.update_contact.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.update_contact.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | @@ -138,7 +145,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-essential-contacts/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -150,7 +157,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-essential-contacts/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/essential-contacts/latest [product-docs]: https://cloud.google.com/resource-manager/docs/managing-notification-contacts/ diff --git a/packages/google-cloud-essentialcontacts/package.json b/packages/google-cloud-essentialcontacts/package.json index 78f071b8074..6a6bc295b97 100644 --- a/packages/google-cloud-essentialcontacts/package.json +++ b/packages/google-cloud-essentialcontacts/package.json @@ -2,7 +2,11 @@ "name": "@google-cloud/essential-contacts", "version": "2.0.2", "description": "Essential contacts client for Node.js", - "repository": "googleapis/nodejs-essential-contacts", + "repository": { + "type": "git", + "directory": "packages/google-cloud-essentialcontacts", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -28,14 +32,14 @@ "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "docs": "jsdoc -c .jsdoc.js", - "samples-test": "cd samples/ && npm link ../ && npm test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", "prelint": "cd samples; npm link ../; npm i", "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -62,5 +66,6 @@ }, "engines": { "node": ">=12.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-essentialcontacts" } diff --git a/packages/google-cloud-essentialcontacts/samples/README.md b/packages/google-cloud-essentialcontacts/samples/README.md index 8d254c332aa..05cb78cb7be 100644 --- a/packages/google-cloud-essentialcontacts/samples/README.md +++ b/packages/google-cloud-essentialcontacts/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Essential Contacts API: Node.js Samples](https://github.com/googleapis/nodejs-essential-contacts) +# [Essential Contacts API: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,19 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Essential_contacts_service.compute_contacts](#essential_contacts_service.compute_contacts) + * [Essential_contacts_service.create_contact](#essential_contacts_service.create_contact) + * [Essential_contacts_service.delete_contact](#essential_contacts_service.delete_contact) + * [Essential_contacts_service.get_contact](#essential_contacts_service.get_contact) + * [Essential_contacts_service.list_contacts](#essential_contacts_service.list_contacts) + * [Essential_contacts_service.send_test_message](#essential_contacts_service.send_test_message) + * [Essential_contacts_service.update_contact](#essential_contacts_service.update_contact) * [Quickstart](#quickstart) ## Before you begin Before running the samples, make sure you've followed the steps outlined in -[Using the client library](https://github.com/googleapis/nodejs-essential-contacts#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +36,135 @@ Before running the samples, make sure you've followed the steps outlined in +### Essential_contacts_service.compute_contacts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.compute_contacts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.compute_contacts.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.compute_contacts.js` + + +----- + + + + +### Essential_contacts_service.create_contact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.create_contact.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.create_contact.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.create_contact.js` + + +----- + + + + +### Essential_contacts_service.delete_contact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.delete_contact.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.delete_contact.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.delete_contact.js` + + +----- + + + + +### Essential_contacts_service.get_contact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.get_contact.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.get_contact.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.get_contact.js` + + +----- + + + + +### Essential_contacts_service.list_contacts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.list_contacts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.list_contacts.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.list_contacts.js` + + +----- + + + + +### Essential_contacts_service.send_test_message + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.send_test_message.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.send_test_message.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.send_test_message.js` + + +----- + + + + +### Essential_contacts_service.update_contact + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.update_contact.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.update_contact.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/essential_contacts_service.update_contact.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-essential-contacts/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-essential-contacts&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node /workspace/google-cloud-node/samples/quickstart.js` @@ -46,5 +172,5 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-essential-contacts&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/resource-manager/docs/managing-notification-contacts/ diff --git a/packages/google-cloud-essentialcontacts/src/index.ts b/packages/google-cloud-essentialcontacts/src/index.ts index 2d6dd7c3959..a91a130e55e 100644 --- a/packages/google-cloud-essentialcontacts/src/index.ts +++ b/packages/google-cloud-essentialcontacts/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/release-please-config.json b/release-please-config.json index ca8fb90627b..9b1e8441fd6 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -19,6 +19,7 @@ "packages/google-cloud-dataproc": {}, "packages/google-cloud-deploy": {}, "packages/google-cloud-discoveryengine": {}, + "packages/google-cloud-essentialcontacts": {}, "packages/google-cloud-gkeconnect-gateway": {}, "packages/google-cloud-gkemulticloud": {}, "packages/google-cloud-language": {}, @@ -49,4 +50,4 @@ } ], "release-type": "node" -} \ No newline at end of file +}