Skip to content

Commit 11cd942

Browse files
authored
chore: add project structure (#1)
1 parent bc029bb commit 11cd942

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2960
-21
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @GoogleCloudPlatform/infra-db-sdk

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
Fixes #<issue_number_goes_here>
1+
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:
2+
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/GoogleCloudPlatform/alloydb-java-connector/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
3+
- [ ] Ensure the tests and linter pass
4+
- [ ] Code coverage does not decrease (if any source code was changed)
5+
- [ ] Appropriate docs were updated (if necessary)
26

3-
> It's a good idea to open an issue first for discussion.
7+
Fixes #<issue_number_goes_here> ☕️
48

5-
- [ ] Tests pass
6-
- [ ] Appropriate changes to documentation are included in the PR
9+
If you write sample code, please follow the [samples format](
10+
https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).

.github/auto-label.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
enabled: true

.github/blunderbuss.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
assign_issues:
16+
- enocom
17+
18+
19+
assign_prs:
20+
- enocom

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
# Disable version updates for Maven dependencies
8+
open-pull-requests-limit: 0
9+
- package-ecosystem: "pip"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
# Disable version updates for pip dependencies
14+
open-pull-requests-limit: 0

.github/generated-files-bot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
externalManifests:
2+
- type: json
3+
file: 'synth.metadata'
4+
jsonpath: '$.generatedFiles[*]'
5+
- type: json
6+
file: '.github/readme/synth.metadata/synth.metadata'
7+
jsonpath: '$.generatedFiles[*]'
8+
ignoreAuthors:
9+
- 'renovate-bot'
10+
- 'yoshi-automation'
11+
- 'release-please[bot]'
12+
- 'gcf-owl-bot[bot]'

.github/header-checker-lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
allowedCopyrightHolders:
16+
- 'Google LLC'
17+
allowedLicenses:
18+
- 'Apache-2.0'
19+
sourceFileExtensions:
20+
- 'py'
21+
- 'yaml'
22+
- 'yml'
23+
- 'sh'

.github/labels.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
- name: duplicate
16+
color: ededed
17+
description: ""
18+
19+
- name: 'type: bug'
20+
color: db4437
21+
description: Error or flaw in code with unintended results or allowing sub-optimal
22+
usage patterns.
23+
- name: 'type: cleanup'
24+
color: c5def5
25+
description: An internal cleanup or hygiene concern.
26+
- name: 'type: docs'
27+
color: 0000A0
28+
description: Improvement to the documentation for an API.
29+
- name: 'type: feature request'
30+
color: c5def5
31+
description: ‘Nice-to-have’ improvement, new feature or different behavior or design.
32+
- name: 'type: process'
33+
color: c5def5
34+
description: A process-related concern. May include testing, release, or the like.
35+
- name: 'type: question'
36+
color: c5def5
37+
description: Request for information or clarification.
38+
39+
- name: 'priority: p0'
40+
color: b60205
41+
description: Highest priority. Critical issue. P0 implies highest priority.
42+
- name: 'priority: p1'
43+
color: ffa03e
44+
description: Important issue which blocks shipping the next release. Will be fixed
45+
prior to next release.
46+
- name: 'priority: p2'
47+
color: fef2c0
48+
description: Moderately-important priority. Fix may not be included in next release.
49+
- name: 'priority: p3'
50+
color: ffffc7
51+
description: Desirable enhancement or fix. May not be included in next release.
52+
53+
- name: automerge
54+
color: 00ff00
55+
description: Merge the pull request once unit tests and other checks pass.
56+
- name: 'automerge: exact'
57+
color: 8dd517
58+
description: Summon MOG for automerging, but approvals need to be against the latest
59+
commit
60+
- name: do not merge
61+
color: d93f0b
62+
description: Indicates a pull request not ready for merge, due to either quality
63+
or timing.
64+
65+
- name: 'autorelease: pending'
66+
color: ededed
67+
description: Release please needs to do its work on this.
68+
- name: 'autorelease: triggered'
69+
color: ededed
70+
description: Release please has triggered a release for this.
71+
- name: 'autorelease: tagged'
72+
color: ededed
73+
description: Release please has completed a release for this.
74+
75+
- name: 'tests: run'
76+
color: 3DED97
77+
description: Label to trigger Github Action tests.
78+
79+
- name: 'flakybot: flaky'
80+
color: 86d9d7
81+
description: Tells the Flaky Bot not to close or comment on this issue.
82+
- name: 'flakybot: quiet'
83+
color: 86d9d7
84+
description: Tells the Flaky Bot to comment less.
85+
- name: 'flakybot: issue'
86+
color: a9f9f7
87+
description: An issue filed by the Flaky Bot. Should not be added manually.

.github/release-please.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bumpMinorPreMajor: true
2+
handleGHRelease: true
3+
releaseType: java-yoshi

.github/release-trigger.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enabled: true

.github/sync-repo-settings.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Whether or not rebase-merging is enabled on this repository.
15+
# Defaults to `true`
16+
rebaseMergeAllowed: false
17+
18+
# Whether or not squash-merging is enabled on this repository.
19+
# Defaults to `true`
20+
squashMergeAllowed: true
21+
22+
# Whether or not PRs are merged with a merge commit on this repository.
23+
# Defaults to `false`
24+
mergeCommitAllowed: false
25+
26+
# Rules for main branch protection
27+
branchProtectionRules:
28+
# Identifies the protection rule pattern. Name of the branch to be protected.
29+
# Defaults to `main`
30+
- pattern: main
31+
# Can admins overwrite branch protection.
32+
# Defaults to `true`
33+
isAdminEnforced: true
34+
# Number of approving reviews required to update matching branches.
35+
# Defaults to `1`
36+
requiredApprovingReviewCount: 1
37+
# Are reviews from code owners required to update matching branches.
38+
# Defaults to `false`
39+
requiresCodeOwnerReviews: true
40+
# Require up to date branches
41+
requiresStrictStatusChecks: false
42+
# List of required status check contexts that must pass for commits to be accepted to matching branches.
43+
requiredStatusCheckContexts:
44+
- "dependencies (11)"
45+
- "lint"
46+
- "units (8)"
47+
- "units (11)"
48+
- "Kokoro - Test: Integration"
49+
- "cla/google"
50+
- "OwlBot Post Processor"
51+
- "Kokoro - Test: Java GraalVM Native Image"
52+
- "Kokoro - Test: Java 17 GraalVM Native Image"

.github/trusted-contribution.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trustedContributors:
2+
- renovate-bot
3+
- gcf-owl-bot[bot]

.github/workflows/approve-readme.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright 2023 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
pull_request:
18+
name: auto-merge-readme
19+
jobs:
20+
approve:
21+
runs-on: ubuntu-latest
22+
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
23+
steps:
24+
- uses: actions/github-script@v6
25+
with:
26+
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
27+
script: |
28+
// only approve PRs from yoshi-automation
29+
if (context.payload.pull_request.user.login !== "yoshi-automation") {
30+
return;
31+
}
32+
33+
// only approve PRs like "chore: release <release version>"
34+
if (!context.payload.pull_request.title === "chore: regenerate README") {
35+
return;
36+
}
37+
38+
// only approve PRs with README.md and synth.metadata changes
39+
const files = new Set(
40+
(
41+
await github.paginate(
42+
github.pulls.listFiles.endpoint({
43+
owner: context.repo.owner,
44+
repo: context.repo.repo,
45+
pull_number: context.payload.pull_request.number,
46+
})
47+
)
48+
).map(file => file.filename)
49+
);
50+
if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) {
51+
return;
52+
}
53+
54+
// approve README regeneration PR
55+
await github.pulls.createReview({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
body: 'Rubber stamped PR!',
59+
pull_number: context.payload.pull_request.number,
60+
event: 'APPROVE'
61+
});
62+
63+
// attach automerge label
64+
await github.issues.addLabels({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
issue_number: context.payload.pull_request.number,
68+
labels: ['automerge']
69+
});

0 commit comments

Comments
 (0)