Skip to content

Commit 519e33b

Browse files
chore: update links in github issue templates (#1328)
* chore: update links in github issue templates --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <[email protected]>
1 parent 9c7730a commit 519e33b

21 files changed

+441
-91
lines changed

Diff for: .github/.OwlBot.lock.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
16-
digest: sha256:e92044720ab3cb6984a70b0c6001081204375959ba3599ef6c42dd99a7783a67
17-
# created: 2023-11-10T00:24:05.581078808Z
16+
digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
17+
# created: 2024-10-01T19:34:30.797530443Z

Diff for: .github/CODEOWNERS

+2-5
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
66

77

8-
# The yoshi-nodejs team is the default owner for nodejs repositories.
9-
* @googleapis/yoshi-nodejs @googleapis/cloud-native-db-dpes @googleapis/api-datastore-sdk
10-
11-
# The github automation team is the default owner for the auto-approve file.
12-
.github/auto-approve.yml @googleapis/github-automation
8+
# Unless specified, the jsteam is the default owner for nodejs repositories.
9+
* @googleapis/cloud-native-db-dpes @googleapis/api-datastore-sdk @googleapis/jsteam

Diff for: .github/ISSUE_TEMPLATE/bug_report.md

-38
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/bug_report.yml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
labels:
4+
- bug
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: >
9+
**PLEASE READ**: If you have a support contract with Google, please
10+
create an issue in the [support
11+
console](https://cloud.google.com/support/) instead of filing on GitHub.
12+
This will ensure a timely response. Otherwise, please make sure to
13+
follow the steps below.
14+
- type: checkboxes
15+
attributes:
16+
label: Please make sure you have searched for information in the following
17+
guides.
18+
options:
19+
- label: "Search the issues already opened:
20+
https://github.com/GoogleCloudPlatform/google-cloud-node/issues"
21+
required: true
22+
- label: "Search StackOverflow:
23+
http://stackoverflow.com/questions/tagged/google-cloud-platform+nod\
24+
e.js"
25+
required: true
26+
- label: "Check our Troubleshooting guide:
27+
https://github.com/googleapis/google-cloud-node/blob/main/docs/trou\
28+
bleshooting.md"
29+
required: true
30+
- label: "Check our FAQ:
31+
https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.\
32+
md"
33+
required: true
34+
- label: "Check our libraries HOW-TO:
35+
https://github.com/googleapis/gax-nodejs/blob/main/client-libraries\
36+
.md"
37+
required: true
38+
- label: "Check out our authentication guide:
39+
https://github.com/googleapis/google-auth-library-nodejs"
40+
required: true
41+
- label: "Check out handwritten samples for many of our APIs:
42+
https://github.com/GoogleCloudPlatform/nodejs-docs-samples"
43+
required: true
44+
- type: textarea
45+
attributes:
46+
label: >
47+
A screenshot that you have tested with "Try this API".
48+
description: >
49+
As our client libraries are mostly autogenerated, we kindly request
50+
that you test whether your issue is with the client library, or with the
51+
API itself. To do so, please search for your API
52+
here: https://developers.google.com/apis-explorer and attempt to
53+
reproduce the issue in the given method. Please include a screenshot of
54+
the response in "Try this API". This response should NOT match the current
55+
behavior you are experiencing. If the behavior is the same, it means
56+
that you are likely experiencing a bug with the API itself. In that
57+
case, please submit an issue to the API team, either by submitting an
58+
issue in its issue tracker (https://cloud.google.com/support/docs/issue-trackers), or by
59+
submitting an issue in its linked tracker in the .repo-metadata.json
60+
file https://issuetracker.google.com/savedsearches/559768
61+
validations:
62+
required: true
63+
- type: input
64+
attributes:
65+
label: >
66+
Link to the code that reproduces this issue. A link to a **public** Github Repository or gist with a minimal
67+
reproduction.
68+
description: >
69+
**Skipping this or providing an invalid link will result in the issue being closed**
70+
validations:
71+
required: true
72+
- type: textarea
73+
attributes:
74+
label: >
75+
A step-by-step description of how to reproduce the issue, based on
76+
the linked reproduction.
77+
description: >
78+
Screenshots can be provided in the issue body below.
79+
placeholder: |
80+
1. Start the application in development (next dev)
81+
2. Click X
82+
3. Y will happen
83+
validations:
84+
required: true
85+
- type: textarea
86+
attributes:
87+
label: A clear and concise description of what the bug is, and what you
88+
expected to happen.
89+
placeholder: Following the steps from the previous section, I expected A to
90+
happen, but I observed B instead
91+
validations:
92+
required: true
93+
94+
- type: textarea
95+
attributes:
96+
label: A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **
97+
placeholder: 'Documentation here(link) states that B should happen instead of A'
98+
validations:
99+
required: true

Diff for: .github/ISSUE_TEMPLATE/documentation_request.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Documentation Requests
2+
description: Requests for more information
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: >
7+
Please use this issue type to log documentation requests against the library itself.
8+
These requests should involve documentation on Github (`.md` files), and should relate to the library
9+
itself. If you have questions or documentation requests for an API, please
10+
reach out to the API tracker itself.
11+
12+
Please submit an issue to the API team, either by submitting an
13+
issue in its issue tracker https://cloud.google.com/support/docs/issue-trackers), or by
14+
submitting an issue in its linked tracker in the .repo-metadata.json
15+
file in the API under packages/* ([example](https://issuetracker.google.com/savedsearches/559768)).
16+
You can also submit a request to documentation on cloud.google.com itself with the "Send Feedback"
17+
on the bottom of the page.
18+
19+
20+
Please note that documentation requests and questions for specific APIs
21+
will be closed.
22+
- type: checkboxes
23+
attributes:
24+
label: Please make sure you have searched for information in the following
25+
guides.
26+
options:
27+
- label: "Search the issues already opened:
28+
https://github.com/GoogleCloudPlatform/google-cloud-node/issues"
29+
required: true
30+
- label: "Check our Troubleshooting guide:
31+
https://googlecloudplatform.github.io/google-cloud-node/#/docs/guid\
32+
es/troubleshooting"
33+
required: true
34+
- label: "Check our FAQ:
35+
https://googlecloudplatform.github.io/google-cloud-node/#/docs/guid\
36+
es/faq"
37+
required: true
38+
- label: "Check our libraries HOW-TO:
39+
https://github.com/googleapis/gax-nodejs/blob/main/client-libraries\
40+
.md"
41+
required: true
42+
- label: "Check out our authentication guide:
43+
https://github.com/googleapis/google-auth-library-nodejs"
44+
required: true
45+
- label: "Check out handwritten samples for many of our APIs:
46+
https://github.com/GoogleCloudPlatform/nodejs-docs-samples"
47+
required: true
48+
- type: textarea
49+
attributes:
50+
label: >
51+
Documentation Request
52+
validations:
53+
required: true

Diff for: .github/ISSUE_TEMPLATE/feature_request.md

-18
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/feature_request.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Feature Request
2+
description: Suggest an idea for this library
3+
labels:
4+
- feature request
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: >
9+
**PLEASE READ**: If you have a support contract with Google, please
10+
create an issue in the [support
11+
console](https://cloud.google.com/support/) instead of filing on GitHub.
12+
This will ensure a timely response. Otherwise, please make sure to
13+
follow the steps below.
14+
- type: textarea
15+
attributes:
16+
label: >
17+
A screenshot that you have tested with "Try this API".
18+
description: >
19+
As our client libraries are mostly autogenerated, we kindly request
20+
that you test whether your feature request is with the client library, or with the
21+
API itself. To do so, please search for your API
22+
here: https://developers.google.com/apis-explorer and attempt to
23+
reproduce the issue in the given method. Please include a screenshot of
24+
the response in "Try this API". This response should NOT match the current
25+
behavior you are experiencing. If the behavior is the same, it means
26+
that you are likely requesting a feature for the API itself. In that
27+
case, please submit an issue to the API team, either by submitting an
28+
issue in its issue tracker https://cloud.google.com/support/docs/issue-trackers, or by
29+
submitting an issue in its linked tracker in the .repo-metadata.json
30+
file in the API under packages/* ([example](https://issuetracker.google.com/savedsearches/559768))
31+
32+
Example of library specific issues would be: retry strategies, authentication questions, or issues with typings.
33+
Examples of API issues would include: expanding method parameter types, adding functionality to an API.
34+
validations:
35+
required: true
36+
- type: textarea
37+
attributes:
38+
label: >
39+
What would you like to see in the library?
40+
description: >
41+
Screenshots can be provided in the issue body below.
42+
placeholder: |
43+
1. Set up authentication like so
44+
2. Run the program like so
45+
3. X would be nice to happen
46+
47+
- type: textarea
48+
attributes:
49+
label: Describe alternatives you've considered
50+
51+
- type: textarea
52+
attributes:
53+
label: Additional context/notes

Diff for: .github/ISSUE_TEMPLATE/processs_request.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
name: Process Request
3+
about: Submit a process request to the library. Process requests are any requests related to library infrastructure, for example CI/CD, publishing, releasing, broken links.
4+
---

Diff for: .github/ISSUE_TEMPLATE/question.md

-12
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/questions.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Question
3+
about: If you have a question, please use Discussions
4+
5+
---
6+
7+
If you have a general question that goes beyond the library itself, we encourage you to use [Discussions](https://github.com//discussions)
8+
to engage with fellow community members!

Diff for: .github/ISSUE_TEMPLATE/support_request.md

-7
This file was deleted.

Diff for: .github/auto-approve.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
processes:
2-
- "NodeDependency"
3-
- "OwlBotTemplateChanges"
2+
- "NodeDependency"

Diff for: .github/scripts/close-invalid-link.cjs

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright 2024 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+
async function closeIssue(github, owner, repo, number) {
16+
await github.rest.issues.createComment({
17+
owner: owner,
18+
repo: repo,
19+
issue_number: number,
20+
body: 'Issue was opened with an invalid reproduction link. Please make sure the repository is a valid, publicly-accessible github repository, and make sure the url is complete (example: https://github.com/googleapis/google-cloud-node)'
21+
});
22+
await github.rest.issues.update({
23+
owner: owner,
24+
repo: repo,
25+
issue_number: number,
26+
state: 'closed'
27+
});
28+
}
29+
module.exports = async ({github, context}) => {
30+
const owner = context.repo.owner;
31+
const repo = context.repo.repo;
32+
const number = context.issue.number;
33+
34+
const issue = await github.rest.issues.get({
35+
owner: owner,
36+
repo: repo,
37+
issue_number: number,
38+
});
39+
40+
const isBugTemplate = issue.data.body.includes('Link to the code that reproduces this issue');
41+
42+
if (isBugTemplate) {
43+
console.log(`Issue ${number} is a bug template`)
44+
try {
45+
const link = issue.data.body.split('\n')[18].match(/(https?:\/\/(gist\.)?github.com\/.*)/)[0];
46+
console.log(`Issue ${number} contains this link: ${link}`)
47+
const isValidLink = (await fetch(link)).ok;
48+
console.log(`Issue ${number} has a ${isValidLink ? 'valid' : 'invalid'} link`)
49+
if (!isValidLink) {
50+
await closeIssue(github, owner, repo, number);
51+
}
52+
} catch (err) {
53+
await closeIssue(github, owner, repo, number);
54+
}
55+
}
56+
};

0 commit comments

Comments
 (0)