From 496b45a986699b26bd0cd1dd4844edc256ffd19c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:10:53 -0400 Subject: [PATCH] chore: update links in github issue templates (#682) * chore: update links in github issue templates * chore: update links in github issue templates Source-Link: https://github.com/googleapis/synthtool/commit/38fa49fb668c2beb27f598ad3dda2aa46b8a10ed Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Sofia Leon --- .github/.OwlBot.lock.yaml | 4 +- .github/ISSUE_TEMPLATE/bug_report.md | 38 ---------------- .github/ISSUE_TEMPLATE/bug_report.yml | 31 ++----------- .github/ISSUE_TEMPLATE/config.yml | 4 -- .github/ISSUE_TEMPLATE/feature_request.md | 18 -------- .github/ISSUE_TEMPLATE/feature_request.yml | 24 +--------- .github/ISSUE_TEMPLATE/processs_request.md | 5 +- .github/ISSUE_TEMPLATE/question.md | 12 ----- .github/scripts/close-invalid-link.cjs | 53 ---------------------- .github/workflows/issues-no-repro.yaml | 18 -------- .jsdoc.js | 51 --------------------- .jsdoc.json | 34 ++++++++++++++ owlbot.py | 2 +- package.json | 8 ++-- 14 files changed, 49 insertions(+), 253 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/question.md delete mode 100644 .github/scripts/close-invalid-link.cjs delete mode 100644 .github/workflows/issues-no-repro.yaml delete mode 100644 .jsdoc.js create mode 100644 .jsdoc.json diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 460f67f2..24943e11 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:a5af6af827a9fffba373151e1453b0498da288024cdd16477900dd42857a42e0 -# created: 2024-09-20T20:26:11.126243246Z + digest: sha256:609822e3c09b7a1bd90b99655904609f162cc15acb4704f1edf778284c36f429 +# created: 2024-10-01T19:34:30.797530443Z diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d2e76a04..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -labels: 'type: bug, priority: p2' ---- - -Thanks for stopping by to let us know something could be better! - -**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. - -1) Is this a client library issue or a product issue? -This is the client library for . We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the [ Support page]() to reach the most relevant engineers. - -2) Did someone already solve this? - - Search the issues already opened: https://github.com/googleapis/github-repo-automation/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-node - - Search or ask on StackOverflow (engineers monitor these tags): http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js - -3) Do you have a support contract? -Please create an issue in the [support console](https://cloud.google.com/support/) to ensure a timely response. - -If the support paths suggested above still do not result in a resolution, please provide the following details. - -#### Environment details - - - OS: - - Node.js version: - - npm version: - - `@google/repo` version: - -#### Steps to reproduce - - 1. ? - 2. ? - -Making sure to follow these steps will guarantee the quickest resolution possible. - -Thanks! diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 81267972..c0e4c27e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -24,12 +24,12 @@ body: e.js" required: true - label: "Check our Troubleshooting guide: - https://googlecloudplatform.github.io/google-cloud-node/#/docs/guid\ - es/troubleshooting" + https://github.com/googleapis/google-cloud-node/blob/main/docs/trou\ + bleshooting.md" required: true - label: "Check our FAQ: - https://googlecloudplatform.github.io/google-cloud-node/#/docs/guid\ - es/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\ @@ -41,34 +41,11 @@ body: - label: "Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples" required: true - - type: textarea - attributes: - label: > - A screenshot that you have tested with "Try this API". - description: > - As our client libraries are mostly autogenerated, we kindly request - that you test whether your issue is with the client library, or with the - API itself. To do so, please search for your API - here: https://developers.google.com/apis-explorer and attempt to - reproduce the issue in the given method. Please include a screenshot of - the response in "Try this API". This response should NOT match the current - behavior you are experiencing. If the behavior is the same, it means - that you are likely experiencing a bug with the API itself. In that - case, 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 https://github.com/googleapis/github-repo-automation/issues - validations: - 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** - validations: - required: true - type: textarea attributes: label: > diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 603b9013..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: Google Cloud Support - url: https://cloud.google.com/support/ - about: If you have a support contract with Google, please use the Google Cloud Support portal. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index b0327dfa..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this library -labels: 'type: feature request, priority: p3' ---- - -Thanks for stopping by to let us know something could be better! - -**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. - - **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - **Describe the solution you'd like** -A clear and concise description of what you want to happen. - **Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - **Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 13abb9a9..a91adf93 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -11,28 +11,6 @@ body: 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: > - A screenshot that you have tested with "Try this API". - description: > - As our client libraries are mostly autogenerated, we kindly request - that you test whether your feature request is with the client library, or with the - API itself. To do so, please search for your API - here: https://developers.google.com/apis-explorer and attempt to - reproduce the issue in the given method. Please include a screenshot of - the response in "Try this API". This response should NOT match the current - behavior you are experiencing. If the behavior is the same, it means - that you are likely requesting a feature for the API itself. In that - case, 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](https://github.com/googleapis/github-repo-automation/issues)) - - Example of library specific issues would be: retry strategies, authentication questions, or issues with typings. - Examples of API issues would include: expanding method parameter types, adding functionality to an API. - validations: - required: true - type: textarea attributes: label: > @@ -50,4 +28,4 @@ body: - type: textarea attributes: - label: Additional context/notes \ No newline at end of file + label: Additional context/notes diff --git a/.github/ISSUE_TEMPLATE/processs_request.md b/.github/ISSUE_TEMPLATE/processs_request.md index 9f88fc1f..45682e8f 100644 --- a/.github/ISSUE_TEMPLATE/processs_request.md +++ b/.github/ISSUE_TEMPLATE/processs_request.md @@ -1,5 +1,4 @@ --- name: Process Request -about: Submit a process request to the library. Process requests are any requests related to library infrastructure, including CI/CD, publishing, releasing, etc. This issue template should primarily used by internal members. - ---- \ No newline at end of file +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. +--- diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 97323113..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Question -about: Ask a question -labels: 'type: question, priority: p3' ---- - -Thanks for stopping by to ask us a question! Please make sure to include: -- What you're trying to do -- What code you've already tried -- Any error messages you're getting - -**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. diff --git a/.github/scripts/close-invalid-link.cjs b/.github/scripts/close-invalid-link.cjs deleted file mode 100644 index ba7d5137..00000000 --- a/.github/scripts/close-invalid-link.cjs +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -async function closeIssue(github, owner, repo, number) { - await github.rest.issues.createComment({ - owner: owner, - repo: repo, - issue_number: number, - 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)' - }); - await github.rest.issues.update({ - owner: owner, - repo: repo, - issue_number: number, - state: 'closed' - }); -} -module.exports = async ({github, context}) => { - const owner = context.repo.owner; - const repo = context.repo.repo; - const number = context.issue.number; - - const issue = await github.rest.issues.get({ - owner: owner, - repo: repo, - issue_number: number, - }); - - const isBugTemplate = issue.data.body.includes('Link to the code that reproduces this issue'); - - if (isBugTemplate) { - try { - const link = issue.data.body.split('\n')[18].match(/(https?:\/\/g?i?s?t?\.?github.com\/.*)/); - const isValidLink = (await fetch(link)).ok; - if (!isValidLink) { - await closeIssue(github, owner, repo, number); - } - } catch (err) { - await closeIssue(github, owner, repo, number); - } - } -}; diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml deleted file mode 100644 index 442a46bc..00000000 --- a/.github/workflows/issues-no-repro.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: invalid_link -on: - issues: - types: [opened, reopened] - -jobs: - close: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/checkout@v4 - - uses: actions/github-script@v7 - with: - script: | - const script = require('./.github/scripts/close-invalid-link.cjs') - await script({github, context}) diff --git a/.jsdoc.js b/.jsdoc.js deleted file mode 100644 index 3c910559..00000000 --- a/.jsdoc.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2019 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 -// -// https://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. -// - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'src', - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2019 Google, LLC.', - includeDate: false, - sourceFiles: false, - systemName: '@google/repo', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/.jsdoc.json b/.jsdoc.json new file mode 100644 index 00000000..49058da5 --- /dev/null +++ b/.jsdoc.json @@ -0,0 +1,34 @@ +{ + "opts": { + "readme": "./README.md", + "package": "./package.json", + "template": "./node_modules/jsdoc-fresh", + "recurse": true, + "verbose": true, + "destination": "./docs/" + }, + "plugins": [ + "plugins/markdown", + "jsdoc-region-tag" + ], + "source": { + "excludePattern": "(^|\\/|\\\\)[._]", + "include": [ + "build/src" + ], + "includePattern": "\\.js$" + }, + "templates": { + "copyright": "Copyright 2024 Google, LLC.", + "includeDate": "false", + "sourceFiles": false, + "systemName": "@google/repo", + "theme": "lumen", + "default": { + "outputSourceFiles": false + } + }, + "markdown": { + "idInHeadings": true + } +} diff --git a/owlbot.py b/owlbot.py index 46cf3ea7..1532983e 100644 --- a/owlbot.py +++ b/owlbot.py @@ -14,4 +14,4 @@ import synthtool.languages.node as node -node.owlbot_main(templates_excludes=["README.md", ".prettierrc.js", ".mocharc.js"]) +node.owlbot_main(templates_excludes=["README.md", ".prettierrc.js", ".mocharc.js",".github/ISSUE_TEMPLATE", ".github/scripts", ".github/workflows/issues-no-repro.yaml"]) diff --git a/package.json b/package.json index 79b427ee..6f36ccf9 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "tweetsodium": "0.0.5" }, "devDependencies": { - "@compodoc/compodoc": "1.1.19", "@types/js-yaml": "^4.0.5", "@types/meow": "6.0.0", "@types/mocha": "^9.1.1", @@ -44,15 +43,18 @@ "c8": "^9.0.0", "gts": "^5.0.0", "linkinator": "^3.0.2", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", "mocha": "^10.0.0", "nock": "^13.2.9", "proxyquire": "^2.1.3", - "sinon": "^15.0.0", + "sinon": "^17.0.0", "typescript": "5.1.6" }, "scripts": { "lint": "gts check", - "docs": "compodoc src/", + "docs": "jsdoc -c .jsdoc.json", "test": "c8 mocha build/test", "check": "gts check", "clean": "gts clean",