Skip to content

Commit 3755188

Browse files
authored
chore: add GitHub config (GoogleCloudPlatform#11)
1 parent fe537d1 commit 3755188

15 files changed

+465
-2
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Bug Report
3+
about: Report defective or unintentional behavior you've experienced.
4+
title: "Brief summary of what bug or error was observed"
5+
labels: 'type: bug'
6+
7+
---
8+
9+
<!--
10+
11+
Thanks for stopping by to let us know something could be better!
12+
13+
**PLEASE READ**: If you have a support contract with Google, please create an
14+
issue in the [support console](https://cloud.google.com/support/) instead of
15+
filing on GitHub. This will ensure a timely response.
16+
17+
Please run down the following list and make sure you've tried the usual "quick fixes":
18+
19+
- Search the issues already opened: https://github.com/GoogleCloudPlatform/alloydb-go-connector/issues
20+
- Check for answers on StackOverflow: https://stackoverflow.com/questions/tagged/google-alloydb
21+
22+
If you are still having issues, please include as much information as possible:
23+
24+
-->
25+
26+
## Bug Description
27+
28+
Please enter a detailed description of the bug, and any information about what
29+
behavior you noticed and why it is defective or unintentional.
30+
31+
## Example code (or command)
32+
33+
```go
34+
// example
35+
```
36+
37+
## Stacktrace
38+
```
39+
Any relevant stacktrace here. Be sure to filter sensitive information.
40+
```
41+
42+
## How to reproduce
43+
44+
1. ?
45+
2. ?
46+
47+
## Environment
48+
49+
1. OS type and version: <YOUR_OS_HERE>
50+
2. Proxy version: <YOUR_VERSION_HERE>

.github/ISSUE_TEMPLATE/config.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2022 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+
blank_issues_enabled: false
16+
contact_links:
17+
- name: AlloyDB Issue tracker
18+
url: https://cloud.google.com/support/docs/issue-trackers
19+
about: Please use the AlloyDB Issue tracker for problems with AlloyDB itself.
20+
- name: StackOverflow
21+
url: https://stackoverflow.com/questions/tagged/google-alloydb
22+
about: Please use the `google-alloydb` tag for questions on StackOverflow.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Documentation Issue
3+
about: Report wrong or missing information with the documentation in the repo.
4+
title: "Brief summary of what is missing or incorrect"
5+
labels: 'type: docs'
6+
7+
---
8+
9+
<!--
10+
11+
Thanks for stopping by to let us know something could be better!
12+
13+
**PLEASE READ**: If you have a support contract with Google, please create an
14+
issue in the [support console](https://cloud.google.com/support/) instead of
15+
filing on GitHub. This will ensure a timely response.
16+
17+
Please run down the following list and make sure you've tried the usual "quick fixes":
18+
19+
- Search the issues already opened: https://github.com/GoogleCloudPlatform/alloydb-go-connector/issues
20+
- Check for answers on StackOverflow: https://stackoverflow.com/questions/tagged/google-alloydb
21+
22+
If you are still having issues, please include as much information as possible:
23+
24+
-->
25+
## Description
26+
Provide a short description of what is missing or incorrect, as well as a link
27+
to the specific location of the information.
28+
29+
## Solution
30+
What would you prefer the documentation say? Why would this information be more
31+
accurate or helpful?
32+
33+
## Additional Context
34+
Please reference any other relevant issues, PRs, descriptions, or screenshots
35+
here.
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for new or improved behavior.
4+
title: "Brief summary of the proposed feature"
5+
labels: 'type: feature request'
6+
7+
---
8+
9+
<!--
10+
11+
Thanks for stopping by to let us know something could be better!
12+
13+
**PLEASE READ**: If you have a support contract with Google, please create an
14+
issue in the [support console](https://cloud.google.com/support/) instead of
15+
filing on GitHub. This will ensure a timely response.
16+
17+
Please run down the following list and make sure you've tried the usual "quick fixes":
18+
19+
- Search the issues already opened: https://github.com/GoogleCloudPlatform/alloydb-go-connector/issues
20+
- Check for answers on StackOverflow: https://stackoverflow.com/questions/tagged/google-alloydb
21+
22+
If you are still having issues, please include as much information as possible:
23+
24+
-->
25+
## Feature Description
26+
A clear and concise description of what feature you would like to see, and why
27+
it would be useful to have added.
28+
29+
## Alternatives Considered
30+
Are there any workaround or third party tools to replicate this behavior? Why
31+
would adding this feature be preferred over them?
32+
33+
## Additional Context
34+
Please reference any other issues, PRs, descriptions, or screenshots here.

.github/ISSUE_TEMPLATE/question.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Question
3+
about: Questions on how something works or the best way to do something.
4+
title: "Brief summary of your question"
5+
labels: 'type: question'
6+
7+
---
8+
9+
<!--
10+
11+
Thanks for stopping by to let us know something could be better!
12+
13+
**PLEASE READ**: If you have a support contract with Google, please create an
14+
issue in the [support console](https://cloud.google.com/support/) instead of
15+
filing on GitHub. This will ensure a timely response.
16+
17+
Please run down the following list and make sure you've tried the usual "quick fixes":
18+
19+
- Search the issues already opened: https://github.com/GoogleCloudPlatform/alloydb-go-connector/issues
20+
- Check for answers on StackOverflow: https://stackoverflow.com/questions/tagged/google-alloydb
21+
22+
If you are still having issues, please include as much information as possible:
23+
24+
-->
25+
26+
## Question
27+
What's your question? Please provide as much relevant information as possible
28+
to reduce turnaround time.
29+
30+
## Additional Context
31+
Please reference any other relevant issues, PRs, descriptions, or screenshots
32+
here.

.github/PULL_REQUEST_TEMPLATE.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Change Description
2+
3+
Please provide a detailed description on what changes your PR will have.
4+
5+
6+
## Checklist
7+
8+
- [ ] Make sure to open an issue as a
9+
[bug/issue](https://github.com/GoogleCloudPlatform//issues/new/choose)
10+
before writing your code! That way we can discuss the change, evaluate
11+
designs, and agree on the general idea.
12+
- [ ] Ensure the tests and linter pass
13+
- [ ] Appropriate documentation is updated (if necessary)
14+
15+
## Relevant issues:
16+
17+
- Fixes #<issue_number_goes_here>

.github/blunderbuss.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2022 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+
assign_issues:
16+
- enocom
17+
assign_prs:
18+
- enocom

.github/header-checker-lint.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2022 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+
- 'go'
21+
- 'yaml'
22+
- 'yml'

.github/labels.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Copyright 2022 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+
69+
- name: 'autorelease: tagged'
70+
color: ededed
71+
description: Release please has completed a release for this.

.github/renovate.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":semanticCommitTypeAll(chore)"
5+
],
6+
"ignorePresets": [":semanticPrefixFixDepsChoreOthers"],
7+
"prConcurrentLimit": 0,
8+
"rebaseStalePrs": true,
9+
"dependencyDashboard": true,
10+
"semanticCommits": true,
11+
"postUpdateOptions": [
12+
"gomodTidy"
13+
],
14+
"packageRules": [
15+
{
16+
"matchPackagePatterns": [".*"],
17+
"addLabels": ["automerge"]
18+
}
19+
],
20+
"schedule": [
21+
"after 8am on Friday",
22+
"before 12pm on Friday"
23+
]
24+
}

.github/workflows/cover.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright 2022 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: code coverage
16+
on: [pull_request]
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Setup Go
23+
uses: actions/setup-go@v3
24+
with:
25+
go-version: "1.18"
26+
27+
- name: Checkout base branch
28+
uses: actions/checkout@v3
29+
with:
30+
ref: ${{ github.base_ref }}
31+
- name: Calculate base code coverage
32+
run: |
33+
go test -short -coverprofile current_cover.out ./... || true
34+
export CUR_COVER=$(go tool cover -func current_cover.out | grep total | awk '{print substr($3, 1, length($3)-1)}')
35+
echo "CUR_COVER=$CUR_COVER" >> $GITHUB_ENV
36+
37+
- name: Checkout PR branch
38+
uses: actions/checkout@v3
39+
- name: Calculate PR code coverage
40+
run: |
41+
go test -short -coverprofile pr_cover.out ./... || true
42+
export PR_COVER=$(go tool cover -func pr_cover.out | grep total | awk '{print substr($3, 1, length($3)-1)}')
43+
echo "PR_COVER=$PR_COVER" >> $GITHUB_ENV
44+
45+
- name: Verify code coverage. If your reading this and the step has failed, please add tests to cover your changes.
46+
run: |
47+
go tool cover -func pr_cover.out
48+
if [ "${{ env.PR_COVER }}" -lt "${{ env.CUR_COVER }}" ]; then
49+
exit 1;
50+
fi

0 commit comments

Comments
 (0)