Skip to content

Commit

Permalink
Merge remote-tracking branch 'java-workflows/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddixit14 committed Aug 26, 2022
2 parents 1b3993f + d0c72cd commit f1bcadb
Show file tree
Hide file tree
Showing 221 changed files with 43,742 additions and 0 deletions.
32 changes: 32 additions & 0 deletions java-workflows/.OwlBot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.


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

deep-copy-regex:
- source: "/google/cloud/workflows/(v.*)/.*-java/proto-google-.*/src"
dest: "/owl-bot-staging/java-workflows/$1/proto-google-cloud-workflows-$1/src"
- source: "/google/cloud/workflows/(v.*)/.*-java/grpc-google-.*/src"
dest: "/owl-bot-staging/java-workflows/$1/grpc-google-cloud-workflows-$1/src"
- source: "/google/cloud/workflows/(v.*)/.*-java/gapic-google-.*/src"
dest: "/owl-bot-staging/java-workflows/$1/google-cloud-workflows/src"
- source: "/google/cloud/workflows/(v.*)/.*-java/samples/snippets/generated"
dest: "/owl-bot-staging/java-workflows/$1/samples/snippets/generated"

api-name: workflows
12 changes: 12 additions & 0 deletions java-workflows/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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

# The @googleapis/aap-dpes is the default owner for changes in this repo
* @googleapis/yoshi-java @googleapis/aap-dpes


# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
51 changes: 51 additions & 0 deletions java-workflows/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -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-workflows/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. 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!
21 changes: 21 additions & 0 deletions java-workflows/.github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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.
7 changes: 7 additions & 0 deletions java-workflows/.github/ISSUE_TEMPLATE/support_request.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions java-workflows/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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-workflows/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> ☕️

If you write sample code, please follow the [samples format](
https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
15 changes: 15 additions & 0 deletions java-workflows/.github/auto-label.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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.
requestsize:
enabled: true
7 changes: 7 additions & 0 deletions java-workflows/.github/blunderbuss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configuration for the Blunderbuss GitHub app. For more info see
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss
assign_prs_by:
- labels:
- samples
to:
- googleapis/java-samples-reviewers
12 changes: 12 additions & 0 deletions java-workflows/.github/generated-files-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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]'
- 'gcf-owl-bot[bot]'
8 changes: 8 additions & 0 deletions java-workflows/.github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bumpMinorPreMajor: true
handleGHRelease: true
releaseType: java-yoshi
branches:
- bumpMinorPreMajor: true
handleGHRelease: true
releaseType: java-yoshi
branch: java7
1 change: 1 addition & 0 deletions java-workflows/.github/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enabled: true
Empty file.
42 changes: 42 additions & 0 deletions java-workflows/.github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
rebaseMergeAllowed: false
squashMergeAllowed: true
mergeCommitAllowed: false
branchProtectionRules:
- pattern: main
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- lint
- units (8)
- units (11)
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
- 'Kokoro - Test: Java GraalVM Native Image'
- 'Kokoro - Test: Java 17 GraalVM Native Image'
- pattern: java7
isAdminEnforced: true
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- dependencies (8)
- dependencies (11)
- lint
- units (7)
- units (8)
- units (11)
- 'Kokoro - Test: Integration'
- cla/google
- OwlBot Post Processor
permissionRules:
- team: yoshi-admins
permission: admin
- team: yoshi-java-admins
permission: admin
- team: yoshi-java
permission: push
3 changes: 3 additions & 0 deletions java-workflows/.github/trusted-contribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trustedContributors:
- renovate-bot
- gcf-owl-bot[bot]
69 changes: 69 additions & 0 deletions java-workflows/.github/workflows/approve-readme.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 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.
# 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.
# Github action job to test core java library features on
# downstream client libraries before they are released.
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@v6
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']
});
Loading

0 comments on commit f1bcadb

Please sign in to comment.