Skip to content

Commit c62efc1

Browse files
chore: update links in github issue templates (#336)
* chore: update links in github issue templates * chore: update links in github issue templates Source-Link: googleapis/synthtool@38fa49f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429 * Update package.json * Update .jsdoc.js * Delete .github/ISSUE_TEMPLATE/bug_report.md * Delete .github/ISSUE_TEMPLATE/feature_request.md * Delete .github/ISSUE_TEMPLATE/question.md * Delete .github/ISSUE_TEMPLATE/support_request.md * Update package.json * Update owlbot.py * Update bug_report.yml * Update agents.ts * Update .repo-metadata.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <[email protected]>
1 parent b2b7cbe commit c62efc1

23 files changed

+413
-91
lines changed

.github/.OwlBot.lock.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -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:68e1cece0d6d3336c4f1cb9d2857b020af5574dff6da6349293d1c6d4eea82d8
17-
# created: 2024-05-31T15:46:42.989947733Z
16+
digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
17+
# created: 2024-10-01T19:34:30.797530443Z

.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
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/jsteam-handwritten-libraries @googleapis/jsteam

.github/ISSUE_TEMPLATE/bug_report.md

-38
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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: input
45+
attributes:
46+
label: >
47+
Link to the code that reproduces this issue. A link to a **public** Github Repository or gist with a minimal
48+
reproduction.
49+
- type: textarea
50+
attributes:
51+
label: >
52+
A step-by-step description of how to reproduce the issue, based on
53+
the linked reproduction.
54+
description: >
55+
Screenshots can be provided in the issue body below.
56+
placeholder: |
57+
1. Start the application in development (next dev)
58+
2. Click X
59+
3. Y will happen
60+
- type: textarea
61+
attributes:
62+
label: A clear and concise description of what the bug is, and what you
63+
expected to happen.
64+
placeholder: Following the steps from the previous section, I expected A to
65+
happen, but I observed B instead
66+
- type: textarea
67+
attributes:
68+
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. **
69+
placeholder: 'Documentation here(link) states that B should happen instead of A'
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]()).
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

.github/ISSUE_TEMPLATE/feature_request.md

-18
This file was deleted.
+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]())
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
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+
---

.github/ISSUE_TEMPLATE/question.md

-12
This file was deleted.

.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!

.github/ISSUE_TEMPLATE/support_request.md

-7
This file was deleted.

.github/auto-approve.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
processes:
2-
- "NodeDependency"
3-
- "OwlBotTemplateChangesNode"
4-
- "OwlBotPRsNode"
2+
- "NodeDependency"
+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)