Skip to content

Commit

Permalink
chore: update links in github issue templates (#196)
Browse files Browse the repository at this point in the history
* chore: update links in github issue templates

Source-Link: https://togithub.com/googleapis/synthtool/commit/38fa49fb668c2beb27f598ad3dda2aa46b8a10ed
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
  • Loading branch information
gcf-owl-bot[bot] authored Oct 23, 2024
1 parent 986b8e5 commit 04df0ac
Show file tree
Hide file tree
Showing 19 changed files with 319 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
digest: sha256:68e1cece0d6d3336c4f1cb9d2857b020af5574dff6da6349293d1c6d4eea82d8
# created: 2024-05-31T15:46:42.989947733Z
digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429
# created: 2024-10-01T19:34:30.797530443Z
7 changes: 2 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax


# The yoshi-nodejs team is the default owner for nodejs repositories.
* @googleapis/yoshi-nodejs

# The github automation team is the default owner for the auto-approve file.
.github/auto-approve.yml @googleapis/github-automation
# Unless specified, the jsteam is the default owner for nodejs repositories.
* @googleapis/jsteam
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Bug Report
description: Create a report to help us improve
labels:
- bug
body:
- type: markdown
attributes:
value: >
**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. Otherwise, please make sure to
follow the steps below.
- type: checkboxes
attributes:
label: Please make sure you have searched for information in the following
guides.
options:
- label: "Search the issues already opened:
https://github.com/GoogleCloudPlatform/google-cloud-node/issues"
required: true
- label: "Search StackOverflow:
http://stackoverflow.com/questions/tagged/google-cloud-platform+nod\
e.js"
required: true
- label: "Check our Troubleshooting guide:
https://github.com/googleapis/google-cloud-node/blob/main/docs/trou\
bleshooting.md"
required: true
- label: "Check our FAQ:
https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.\
md"
required: true
- label: "Check our libraries HOW-TO:
https://github.com/googleapis/gax-nodejs/blob/main/client-libraries\
.md"
required: true
- label: "Check out our authentication guide:
https://github.com/googleapis/google-auth-library-nodejs"
required: true
- label: "Check out handwritten samples for many of our APIs:
https://github.com/GoogleCloudPlatform/nodejs-docs-samples"
required: true
- type: input
attributes:
label: >
Link to the code that reproduces this issue. A link to a **public** Github Repository or gist with a minimal
reproduction.
description: >
**Skipping this or providing an invalid link will result in the issue being closed**
- type: textarea
attributes:
label: >
A step-by-step description of how to reproduce the issue, based on
the linked reproduction.
description: >
Screenshots can be provided in the issue body below.
placeholder: |
1. Start the application in development (next dev)
2. Click X
3. Y will happen
- type: textarea
attributes:
label: A clear and concise description of what the bug is, and what you
expected to happen.
placeholder: Following the steps from the previous section, I expected A to
happen, but I observed B instead

- type: textarea
attributes:
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. **
placeholder: 'Documentation here(link) states that B should happen instead of A'
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Documentation Requests
description: Requests for more information
body:
- type: markdown
attributes:
value: >
Please use this issue type to log documentation requests against the library itself.
These requests should involve documentation on Github (`.md` files), and should relate to the library
itself. If you have questions or documentation requests for an API, please
reach out to the API tracker itself.
Please submit an issue to the API team, either by submitting an
issue in its issue tracker https://cloud.google.com/support/docs/issue-trackers), or by
submitting an issue in its linked tracker in the .repo-metadata.json
file in the API under packages/* ([example]()).
You can also submit a request to documentation on cloud.google.com itself with the "Send Feedback"
on the bottom of the page.
Please note that documentation requests and questions for specific APIs
will be closed.
- type: checkboxes
attributes:
label: Please make sure you have searched for information in the following
guides.
options:
- label: "Search the issues already opened:
https://github.com/GoogleCloudPlatform/google-cloud-node/issues"
required: true
- label: "Check our Troubleshooting guide:
https://googlecloudplatform.github.io/google-cloud-node/#/docs/guid\
es/troubleshooting"
required: true
- label: "Check our FAQ:
https://googlecloudplatform.github.io/google-cloud-node/#/docs/guid\
es/faq"
required: true
- label: "Check our libraries HOW-TO:
https://github.com/googleapis/gax-nodejs/blob/main/client-libraries\
.md"
required: true
- label: "Check out our authentication guide:
https://github.com/googleapis/google-auth-library-nodejs"
required: true
- label: "Check out handwritten samples for many of our APIs:
https://github.com/GoogleCloudPlatform/nodejs-docs-samples"
required: true
- type: textarea
attributes:
label: >
Documentation Request
validations:
required: true
18 changes: 0 additions & 18 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature Request
description: Suggest an idea for this library
labels:
- feature request
body:
- type: markdown
attributes:
value: >
**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. Otherwise, please make sure to
follow the steps below.
- type: textarea
attributes:
label: >
What would you like to see in the library?
description: >
Screenshots can be provided in the issue body below.
placeholder: |
1. Set up authentication like so
2. Run the program like so
3. X would be nice to happen
- type: textarea
attributes:
label: Describe alternatives you've considered

- type: textarea
attributes:
label: Additional context/notes
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/processs_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
name: Process Request
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.
---
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Question
about: If you have a question, please use Discussions

---

If you have a general question that goes beyond the library itself, we encourage you to use [Discussions](https://github.com//discussions)
to engage with fellow community members!
4 changes: 1 addition & 3 deletions .github/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
processes:
- "NodeDependency"
- "OwlBotTemplateChangesNode"
- "OwlBotPRsNode"
- "NodeDependency"
69 changes: 69 additions & 0 deletions .github/scripts/close-unresponsive.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Copyright 2024 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.

function labeledEvent(data) {
return data.event === 'labeled' && data.label.name === 'needs more info';
}

const numberOfDaysLimit = 15;
const close_message = `This has been closed since a request for information has \
not been answered for ${numberOfDaysLimit} days. It can be reopened when the \
requested information is provided.`;

module.exports = async ({github, context}) => {
const owner = context.repo.owner;
const repo = context.repo.repo;

const issues = await github.rest.issues.listForRepo({
owner: owner,
repo: repo,
labels: 'needs more info',
});
const numbers = issues.data.map((e) => e.number);

for (const number of numbers) {
const events = await github.paginate(
github.rest.issues.listEventsForTimeline,
{
owner: owner,
repo: repo,
issue_number: number,
},
(response) => response.data.filter(labeledEvent)
);

const latest_response_label = events[events.length - 1];

const created_at = new Date(latest_response_label.created_at);
const now = new Date();
const diff = now - created_at;
const diffDays = diff / (1000 * 60 * 60 * 24);

if (diffDays > numberOfDaysLimit) {
await github.rest.issues.update({
owner: owner,
repo: repo,
issue_number: number,
state: 'closed',
});

await github.rest.issues.createComment({
owner: owner,
repo: repo,
issue_number: number,
body: close_message,
});
}
}
};
33 changes: 33 additions & 0 deletions .github/scripts/remove-response-label.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2024 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.

module.exports = async ({ github, context }) => {
const commenter = context.actor;
const issue = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const author = issue.data.user.login;
const labels = issue.data.labels.map((e) => e.name);

if (author === commenter && labels.includes('needs more info')) {
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: 'needs more info',
});
}
};
Loading

0 comments on commit 04df0ac

Please sign in to comment.