Skip to content

Remove circular dependency in API sample generation #1906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2025

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Jun 3, 2025

Fixes #1792

Let's just source these samples directly from the generated files. That way, they'll always work even if the site is down.

Note: for formula.json, it's a little more tricky because the generated file is actually a template that is only expanded after the site is generated. Instead, just modify the formula/wget.json file to match the syntax that would be used in the larger file (indent, add surrounding brackets, and remove the analytics).

For the "docs" workflow, we currently generate the API samples to run the API docs page through HTMLProofer. As far as I can tell, this just checks for broken links and malformed content, so we can just put template contents in for the sake of this check. This avoids the hassle of actually generating the API files or importing them from a separate actions run when we don't need to.

And, while I'm here, let's add explicit contents: read permissions to the workflows that don't have them defined.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Makes sense to me, thanks @Rylan12!

@MikeMcQuaid MikeMcQuaid merged commit 7b1c43c into master Jun 3, 2025
13 checks passed
@MikeMcQuaid MikeMcQuaid deleted the remove-api-sample-circular-dep branch June 3, 2025 08:21
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.

API samples generation job should not have a circular dependency on the site
2 participants