Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
chore: new owl bot post processor docker image (#507)
Browse files Browse the repository at this point in the history
gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
  • Loading branch information
gcf-owl-bot[bot] committed May 10, 2021
1 parent 077490c commit a7435a5
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
@@ -1,3 +1,3 @@
docker:
digest: sha256:c3eae37a355402067b97cbeb6f5a7d2dd87aecfd064aeb2d2ea0bde40778cf68
image: gcr.io/repo-automation-bots/owlbot-nodejs:latest
digest: sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
13 changes: 13 additions & 0 deletions .github/generated-files-bot.yml
@@ -0,0 +1,13 @@
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'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
@@ -1,7 +1,7 @@
on:
push:
branches:
- $default-branch
- master
pull_request:
name: ci
jobs:
Expand Down
18 changes: 9 additions & 9 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions src/v1/text_to_speech_client.ts
Expand Up @@ -200,13 +200,14 @@ export class TextToSpeechClient {
const textToSpeechStubMethods = ['listVoices', 'synthesizeSpeech'];
for (const methodName of textToSpeechStubMethods) {
const callPromise = this.textToSpeechStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down
15 changes: 8 additions & 7 deletions src/v1beta1/text_to_speech_client.ts
Expand Up @@ -200,13 +200,14 @@ export class TextToSpeechClient {
const textToSpeechStubMethods = ['listVoices', 'synthesizeSpeech'];
for (const methodName of textToSpeechStubMethods) {
const callPromise = this.textToSpeechStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down
17 changes: 7 additions & 10 deletions test/gapic_text_to_speech_v1.ts
Expand Up @@ -26,10 +26,9 @@ import * as texttospeechModule from '../src';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -168,9 +167,8 @@ describe('v1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1.ListVoicesResponse()
);
client.innerApiCalls.listVoices = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.listVoices =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.listVoices(
request,
Expand Down Expand Up @@ -256,9 +254,8 @@ describe('v1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1.SynthesizeSpeechResponse()
);
client.innerApiCalls.synthesizeSpeech = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.synthesizeSpeech =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.synthesizeSpeech(
request,
Expand Down
17 changes: 7 additions & 10 deletions test/gapic_text_to_speech_v1beta1.ts
Expand Up @@ -26,10 +26,9 @@ import * as texttospeechModule from '../src';
import {protobuf} from 'google-gax';

function generateSampleMessage<T extends object>(instance: T) {
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
instance as protobuf.Message<T>,
{defaults: true}
);
const filledObject = (
instance.constructor as typeof protobuf.Message
).toObject(instance as protobuf.Message<T>, {defaults: true});
return (instance.constructor as typeof protobuf.Message).fromObject(
filledObject
) as T;
Expand Down Expand Up @@ -170,9 +169,8 @@ describe('v1beta1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1beta1.ListVoicesResponse()
);
client.innerApiCalls.listVoices = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.listVoices =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.listVoices(
request,
Expand Down Expand Up @@ -258,9 +256,8 @@ describe('v1beta1.TextToSpeechClient', () => {
const expectedResponse = generateSampleMessage(
new protos.google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse()
);
client.innerApiCalls.synthesizeSpeech = stubSimpleCallWithCallback(
expectedResponse
);
client.innerApiCalls.synthesizeSpeech =
stubSimpleCallWithCallback(expectedResponse);
const promise = new Promise((resolve, reject) => {
client.synthesizeSpeech(
request,
Expand Down

0 comments on commit a7435a5

Please sign in to comment.