Skip to content
Permalink
Browse files
feat: initial generation
  • Loading branch information
Neenu1995 committed May 3, 2021
0 parents commit cfa6187666a260af5a345c19fc2553f948d65200
Showing with 22,704 additions and 0 deletions.
  1. +3 −0 .github/.OwlBot.lock.yaml
  2. +29 −0 .github/.OwlBot.yaml
  3. +10 −0 .github/CODEOWNERS
  4. +51 −0 .github/ISSUE_TEMPLATE/bug_report.md
  5. +21 −0 .github/ISSUE_TEMPLATE/feature_request.md
  6. +7 −0 .github/ISSUE_TEMPLATE/support_request.md
  7. +7 −0 .github/PULL_REQUEST_TEMPLATE.md
  8. +7 −0 .github/blunderbuss.yml
  9. +11 −0 .github/generated-files-bot.yml
  10. +19 −0 .github/readme/synth.py
  11. +2 −0 .github/release-please.yml
  12. 0 .github/snippet-bot.yml
  13. +49 −0 .github/sync-repo-settings.yaml
  14. +2 −0 .github/trusted-contribution.yml
  15. +54 −0 .github/workflows/approve-readme.yaml
  16. +88 −0 .github/workflows/auto-release.yaml
  17. +83 −0 .github/workflows/ci.yaml
  18. +14 −0 .github/workflows/samples.yaml
  19. +17 −0 .gitignore
  20. +3 −0 .kokoro/build.bat
  21. +125 −0 .kokoro/build.sh
  22. +38 −0 .kokoro/coerce_logs.sh
  23. +13 −0 .kokoro/common.cfg
  24. +58 −0 .kokoro/common.sh
  25. +25 −0 .kokoro/continuous/common.cfg
  26. +12 −0 .kokoro/continuous/java8.cfg
  27. +55 −0 .kokoro/continuous/readme.cfg
  28. +90 −0 .kokoro/dependencies.sh
  29. +25 −0 .kokoro/nightly/common.cfg
  30. +37 −0 .kokoro/nightly/integration.cfg
  31. +7 −0 .kokoro/nightly/java11.cfg
  32. +7 −0 .kokoro/nightly/java7.cfg
  33. +3 −0 .kokoro/nightly/java8-osx.cfg
  34. +3 −0 .kokoro/nightly/java8-win.cfg
  35. +12 −0 .kokoro/nightly/java8.cfg
  36. +38 −0 .kokoro/nightly/samples.cfg
  37. +43 −0 .kokoro/populate-secrets.sh
  38. +13 −0 .kokoro/presubmit/clirr.cfg
  39. +34 −0 .kokoro/presubmit/common.cfg
  40. +12 −0 .kokoro/presubmit/dependencies.cfg
  41. +33 −0 .kokoro/presubmit/integration.cfg
  42. +7 −0 .kokoro/presubmit/java11.cfg
  43. +7 −0 .kokoro/presubmit/java7.cfg
  44. +3 −0 .kokoro/presubmit/java8-osx.cfg
  45. +3 −0 .kokoro/presubmit/java8-win.cfg
  46. +12 −0 .kokoro/presubmit/java8.cfg
  47. +12 −0 .kokoro/presubmit/linkage-monitor.cfg
  48. +13 −0 .kokoro/presubmit/lint.cfg
  49. +33 −0 .kokoro/presubmit/samples.cfg
  50. +45 −0 .kokoro/readme.sh
  51. +53 −0 .kokoro/release/bump_snapshot.cfg
  52. +49 −0 .kokoro/release/common.cfg
  53. +50 −0 .kokoro/release/common.sh
  54. +6 −0 .kokoro/release/drop.cfg
  55. +32 −0 .kokoro/release/drop.sh
  56. +6 −0 .kokoro/release/promote.cfg
  57. +34 −0 .kokoro/release/promote.sh
  58. +23 −0 .kokoro/release/publish_javadoc.cfg
  59. +53 −0 .kokoro/release/publish_javadoc.sh
  60. +30 −0 .kokoro/release/publish_javadoc11.cfg
  61. +58 −0 .kokoro/release/publish_javadoc11.sh
  62. +6 −0 .kokoro/release/snapshot.cfg
  63. +33 −0 .kokoro/release/snapshot.sh
  64. +19 −0 .kokoro/release/stage.cfg
  65. +45 −0 .kokoro/release/stage.sh
  66. +26 −0 .kokoro/trampoline.sh
  67. +15 −0 .repo-metadata.json
  68. +94 −0 CODE_OF_CONDUCT.md
  69. +139 −0 CONTRIBUTING.md
  70. +201 −0 LICENSE
  71. +4 −0 codecov.yaml
  72. +85 −0 google-cloud-essential-contacts-bom/pom.xml
  73. +111 −0 google-cloud-essential-contacts/pom.xml
  74. +1,139 −0 ...-contacts/src/main/java/com/google/cloud/essentialcontacts/v1/EssentialContactsServiceClient.java
  75. +258 −0 ...ontacts/src/main/java/com/google/cloud/essentialcontacts/v1/EssentialContactsServiceSettings.java
  76. +39 −0 ...-cloud-essential-contacts/src/main/java/com/google/cloud/essentialcontacts/v1/gapic_metadata.json
  77. +38 −0 ...le-cloud-essential-contacts/src/main/java/com/google/cloud/essentialcontacts/v1/package-info.java
  78. +85 −0 ...ntacts/src/main/java/com/google/cloud/essentialcontacts/v1/stub/EssentialContactsServiceStub.java
  79. +556 −0 ...rc/main/java/com/google/cloud/essentialcontacts/v1/stub/EssentialContactsServiceStubSettings.java
  80. +113 −0 .../java/com/google/cloud/essentialcontacts/v1/stub/GrpcEssentialContactsServiceCallableFactory.java
  81. +393 −0 ...ts/src/main/java/com/google/cloud/essentialcontacts/v1/stub/GrpcEssentialContactsServiceStub.java
  82. +752 −0 ...tacts/src/test/java/com/google/cloud/essentialcontacts/v1/EssentialContactsServiceClientTest.java
  83. +59 −0 ...al-contacts/src/test/java/com/google/cloud/essentialcontacts/v1/MockEssentialContactsService.java
  84. +206 −0 ...ontacts/src/test/java/com/google/cloud/essentialcontacts/v1/MockEssentialContactsServiceImpl.java
  85. +69 −0 grpc-google-cloud-essential-contacts-v1/pom.xml
  86. +1,092 −0 ...contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/EssentialContactsServiceGrpc.java
  87. +15 −0 java.header
  88. +10 −0 license-checks.xml
  89. +24 −0 owlbot.py
  90. +179 −0 pom.xml
  91. +19 −0 proto-google-cloud-essential-contacts-v1/clirr-ignored-differences.xml
  92. +46 −0 proto-google-cloud-essential-contacts-v1/pom.xml
  93. +1,444 −0 ...ntial-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsRequest.java
  94. +189 −0 ...tacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsRequestOrBuilder.java
  95. +1,203 −0 ...tial-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsResponse.java
  96. +118 −0 ...acts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ComputeContactsResponseOrBuilder.java
  97. +1,961 −0 ...ogle-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/Contact.java
  98. +371 −0 ...-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ContactName.java
  99. +260 −0 ...d-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ContactOrBuilder.java
  100. +979 −0 ...sential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/CreateContactRequest.java
  101. +102 −0 ...ontacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/CreateContactRequestOrBuilder.java
  102. +672 −0 ...sential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/DeleteContactRequest.java
  103. +60 −0 ...ontacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/DeleteContactRequestOrBuilder.java
  104. +61 −0 ...e-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/EnumsProto.java
  105. +168 −0 ...e-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/FolderName.java
  106. +672 −0 ...-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/GetContactRequest.java
  107. +60 −0 ...l-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/GetContactRequestOrBuilder.java
  108. +967 −0 ...ssential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsRequest.java
  109. +105 −0 ...contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsRequestOrBuilder.java
  110. +1,153 −0 ...sential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsResponse.java
  111. +108 −0 ...ontacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ListContactsResponseOrBuilder.java
  112. +328 −0 ...sential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/NotificationCategory.java
  113. +168 −0 ...d-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/OrganizationName.java
  114. +168 −0 ...-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ProjectName.java
  115. +1,209 −0 ...ntial-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/SendTestMessageRequest.java
  116. +164 −0 ...tacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/SendTestMessageRequestOrBuilder.java
  117. +310 −0 ...ogle-cloud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/Service.java
  118. +1,079 −0 ...sential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/UpdateContactRequest.java
  119. +113 −0 ...ontacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/UpdateContactRequestOrBuilder.java
  120. +181 −0 ...ud-essential-contacts-v1/src/main/java/com/google/cloud/essentialcontacts/v1/ValidationState.java
  121. +80 −0 ...o-google-cloud-essential-contacts-v1/src/main/proto/google/cloud/essentialcontacts/v1/enums.proto
  122. +343 −0 ...google-cloud-essential-contacts-v1/src/main/proto/google/cloud/essentialcontacts/v1/service.proto
  123. +73 −0 renovate.json
  124. +84 −0 samples/install-without-bom/pom.xml
  125. +56 −0 samples/pom.xml
  126. +83 −0 samples/snapshot/pom.xml
  127. +47 −0 samples/snippets/pom.xml
  128. +6 −0 versions.txt
@@ -0,0 +1,3 @@
docker:
digest: sha256:984b2b7b8d75fa16ff0e0b3dcdd1e86561b44e8eac23f7a1378db3d339f11333
image: gcr.io/repo-automation-bots/owlbot-java:latest
@@ -0,0 +1,29 @@
# 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-java:latest"

deep-remove-regex:
- "/grpc-google-.*/src"
- "/proto-google-.*/src"
- "/google-.*/src"

deep-copy-regex:
- source: "/google/cloud/essentialcontacts/(v.*)/.*-java/proto-google-.*/src"
dest: "/owl-bot-staging/$1/proto-google-cloud-essential-contacts-$1/src"
- source: "/google/cloud/essentialcontacts/(v.*)/.*-java/grpc-google-.*/src"
dest: "/owl-bot-staging/$1/grpc-google-cloud-essential-contacts-$1/src"
- source: "/google/cloud/essentialcontacts/(v.*)/.*-java/gapic-google-.*/src"
dest: "/owl-bot-staging/$1/google-cloud-essential-contacts/src"
Validating CODEOWNERS rules …
@@ -0,0 +1,10 @@
# Code owners file.
# This file controls who is tagged for review for any given pull request.

# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

* @googleapis/yoshi-java

# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
@@ -0,0 +1,51 @@
---
name: Bug report
about: Create a report to help us improve

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/java-essential-contacts/issues
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform

If you are still having issues, please include as much information as possible:

#### Environment details

1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types
2. OS type and version:
3. Java version:
4. essential-contacts version(s):

#### Steps to reproduce

1. ?
2. ?

#### Code example

```java
// example
```

#### Stack trace
```
Any relevant stacktrace here.
```

#### External references such as API reference guides

- ?

#### Any additional information below


Following these steps guarantees the quickest resolution possible.

Thanks!
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this library

---

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

**Is your feature request related to a problem? Please describe.**
What the problem is. Example: I'm always frustrated when [...]

**Describe the solution you'd like**
What you want to happen.

**Describe alternatives you've considered**
Any alternative solutions or features you've considered.

**Additional context**
Any other context or screenshots about the feature request.
@@ -0,0 +1,7 @@
---
name: Support request
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.

---

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
@@ -0,0 +1,7 @@
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-essential-contacts/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️
@@ -0,0 +1,7 @@
# Configuration for the Blunderbuss GitHub app. For more info see
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
assign_prs_by:
- labels:
- samples
to:
- googleapis/java-samples-reviewers
@@ -0,0 +1,11 @@
externalManifests:
- type: json
file: 'synth.metadata'
jsonpath: '$.generatedFiles[*]'
- type: json
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
ignoreAuthors:
- 'renovate-bot'
- 'yoshi-automation'
- 'release-please[bot]'
@@ -0,0 +1,19 @@
# Copyright 2020 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.

"""This script is used to synthesize generated the README for this library."""

from synthtool.languages import java

java.custom_templates(["java_library/README.md"])
@@ -0,0 +1,2 @@
releaseType: java-yoshi
bumpMinorPreMajor: true
Empty file.
@@ -0,0 +1,49 @@

# Whether or not rebase-merging is enabled on this repository.
# Defaults to `true`
rebaseMergeAllowed: false

# Whether or not squash-merging is enabled on this repository.
# Defaults to `true`
squashMergeAllowed: true

# Whether or not PRs are merged with a merge commit on this repository.
# Defaults to `false`
mergeCommitAllowed: false

# Rules for master branch protection
branchProtectionRules:
# Identifies the protection rule pattern. Name of the branch to be protected.
# Defaults to `master`
- pattern: master
# Can admins overwrite branch protection.
# Defaults to `true`
isAdminEnforced: true
# Number of approving reviews required to update matching branches.
# Defaults to `1`
requiredApprovingReviewCount: 1
# Are reviews from code owners required to update matching branches.
# Defaults to `false`
requiresCodeOwnerReviews: true
# Require up to date branches
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"
# List of explicit permissions to add (additive only)
permissionRules:
- team: yoshi-admins
permission: admin
- team: yoshi-java-admins
permission: admin
- team: yoshi-java
permission: push
@@ -0,0 +1,2 @@
trustedContributors:
- renovate-bot
@@ -0,0 +1,54 @@
on:
pull_request:
name: auto-merge-readme
jobs:
approve:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
// only approve PRs from yoshi-automation
if (context.payload.pull_request.user.login !== "yoshi-automation") {
return;
}
// only approve PRs like "chore: release <release version>"
if (!context.payload.pull_request.title === "chore: regenerate README") {
return;
}
// only approve PRs with README.md and synth.metadata changes
const files = new Set(
(
await github.paginate(
github.pulls.listFiles.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
})
)
).map(file => file.filename)
);
if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) {
return;
}
// approve README regeneration PR
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Rubber stamped PR!',
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
});
// attach automerge label
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['automerge']
});
@@ -0,0 +1,88 @@
on:
pull_request:
name: auto-release
jobs:
approve:
runs-on: ubuntu-latest
if: contains(github.head_ref, 'release-please')
steps:
- uses: actions/github-script@v3
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
debug: true
script: |
// only approve PRs from release-please[bot]
if (context.payload.pull_request.user.login !== "release-please[bot]") {
return;
}
// only approve PRs like "chore: release <release version>"
if ( !context.payload.pull_request.title.startsWith("chore: release") ) {
return;
}
// only approve PRs with pom.xml and versions.txt changes
const filesPromise = github.pulls.listFiles.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
});
const changed_files = await github.paginate(filesPromise)
if ( changed_files.length < 1 ) {
console.log( "Not proceeding since PR is empty!" )
return;
}
if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) {
console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" )
return;
}
// trigger auto-release when
// 1) it is a SNAPSHOT release (auto-generated post regular release)
// 2) there are dependency updates only
// 3) there are no open dependency update PRs in this repo (to avoid multiple releases)
if (
context.payload.pull_request.body.includes("Fix") ||
context.payload.pull_request.body.includes("Build") ||
context.payload.pull_request.body.includes("Documentation") ||
context.payload.pull_request.body.includes("BREAKING CHANGES") ||
context.payload.pull_request.body.includes("Features")
) {
console.log( "Not auto-releasing since it is not a dependency-update-only release." );
return;
}
const promise = github.pulls.list.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
const open_pulls = await github.paginate(promise)
if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) {
for ( const pull of open_pulls ) {
if ( pull.title.startsWith("deps: update dependency") ) {
console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." );
return;
}
}
}
// approve release PR
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Rubber stamped release!',
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
});
// attach kokoro:force-run and automerge labels
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['kokoro:force-run', 'automerge']
});

0 comments on commit cfa6187

Please sign in to comment.