Skip to content

build: fix readme generation, do not fail if product documentation does not exist#3474

Merged
sofisl merged 5 commits intomainfrom
fixREADMEGeneration
Nov 4, 2022
Merged

build: fix readme generation, do not fail if product documentation does not exist#3474
sofisl merged 5 commits intomainfrom
fixREADMEGeneration

Conversation

@sofisl
Copy link
Copy Markdown
Contributor

@sofisl sofisl commented Nov 2, 2022

Fixes #3387

@sofisl sofisl requested a review from a team November 2, 2022 01:38
@sofisl sofisl changed the title fix: readme generation, do not fail if product documentation does not exist build: fix readme generation, do not fail if product documentation does not exist Nov 2, 2022
Comment thread bin/generate-readme.mjs
method: 'HEAD',
validateStatus: () => true
});
} catch (err) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would look at the error code and only set remoteUrlExists = false if the error returned is a 404 (indicating that it doesn't exist).

This way we don't mess up the README.md if there happen to be spurious 500s.

@sofisl sofisl requested a review from bcoe November 2, 2022 21:34
Comment thread bin/generate-readme.mjs Outdated
supportDocsUrl = 'https://cloud.google.com/stackdriver/docs/getting-support';
}

if (!supportDocsUrl.match(/https/)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do /^https:/ to avoid possible matches in the middle of the string.

@sofisl sofisl merged commit 60e1264 into main Nov 4, 2022
@sofisl sofisl deleted the fixREADMEGeneration branch November 4, 2022 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libraries.json missing repo metadata update

3 participants