Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/update-api-list.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
name: Update API List

permissions:
contents: read

concurrency:
group: update-api-list
cancel-in-progress: false

on:
schedule:
- cron: "0 1 * * *"
- cron: "0 1 * * 1"
workflow_dispatch:

jobs:
update-api-list:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
issues: write # Added for creating issues on failure
Expand Down Expand Up @@ -44,5 +51,5 @@ jobs:
uses: googleapis/librarian/.github/actions/create-issue-on-failure@baf9b8078c5e98cb90b53088f284fb7b060e195b # main
with:
title: "Update API list failed"
body: "The daily scheduled task to update the API list failed."
body: "The weekly scheduled task to update the API list failed."
mention: "@googleapis/cloud-sdk-nodejs-team"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ best-efforts basis with the following warnings:
Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
The dist-tags follow the naming convention `legacy-(version)`.
For example, `{{ metadata['lib_install_cmd'] }}@legacy-10` installs client libraries
For example, `npm install @google-cloud/<library>@legacy-10` installs client libraries
for versions compatible with Node.js 10.

## Versioning
Expand Down
2 changes: 1 addition & 1 deletion bin/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ best-efforts basis with the following warnings:
Client libraries targeting some end-of-life versions of Node.js are available, and
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
The dist-tags follow the naming convention `legacy-(version)`.
For example, `{{ metadata['lib_install_cmd'] }}@legacy-10` installs client libraries
For example, `npm install @google-cloud/<library>@legacy-10` installs client libraries
for versions compatible with Node.js 10.

## Versioning
Expand Down
12 changes: 10 additions & 2 deletions bin/generate-readme.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const github = new Gaxios({
retries: 3
}
});
const npmRegistry = new Gaxios({
retryConfig: {
retries: 3
}
});

function checkpoint (message, success = true) {
const prefix = success ? chalk.green(figures.tick) : chalk.red(figures.cross);
Expand Down Expand Up @@ -88,7 +93,7 @@ async function downloadRepoMetadata () {
continue;
}
try {
await github.request({
await npmRegistry.request({
url: `https://registry.npmjs.org/${packageName}`,
method: 'HEAD'
});
Expand Down Expand Up @@ -166,8 +171,11 @@ async function processMetadata (repoMetadata) {
method: 'HEAD',
validateStatus: () => true
});
if (res.status === 404) {
remoteUrlExists = false;
}
} catch (err) {
if (err.status === 404) {
if (err.status === 404 || err.response?.status === 404) {
remoteUrlExists = false;
}
}
Comment thread
quirogas marked this conversation as resolved.
Resolved
Expand Down
Loading