Skip to content

docs: add doc generation script, metadata schema, and cleanup #1232

Merged
liamfallon merged 3 commits into
kptdev:mainfrom
Nordix:add_docs_gen_mech
Apr 16, 2026
Merged

docs: add doc generation script, metadata schema, and cleanup #1232
liamfallon merged 3 commits into
kptdev:mainfrom
Nordix:add_docs_gen_mech

Conversation

@efiacor
Copy link
Copy Markdown
Collaborator

@efiacor efiacor commented Apr 15, 2026

Add doc generation script and metadata schema

  • Add generate_docs.sh to generate Hugo doc pages from function
    README.md and metadata.yaml
  • Add metadata-schema.json and validate_metadata.sh with CI job
  • Remove legacy update_function_docs and patch_reader scripts
  • Remove emails field from all metadata.yaml files
  • Remove duplicate krm-fn-metadata.yaml from apply-setters
  • Update RELEASING.md with new doc generation workflow
  • Update README.md with Getting Started links

Copilot AI review requested due to automatic review settings April 15, 2026 23:19
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 15, 2026

Deploy Preview for krm-function-catalog canceled.

Name Link
🔨 Latest commit 209b13c
🔍 Latest deploy log https://app.netlify.com/projects/krm-function-catalog/deploys/69e0e386a6b53f00083f8e8a

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the function documentation workflow by replacing the legacy Go-based doc/tag updater with a Hugo doc generation + metadata schema validation approach, and cleans up metadata to align with the new schema.

Changes:

  • Add scripts/generate_docs/generate_docs.sh to generate Hugo pages from README.md + metadata.yaml and add validate_metadata.sh + CI job to validate metadata.
  • Introduce functions/go/metadata-schema.json and remove the legacy update_function_docs and patch_reader tooling.
  • Normalize function metadata by removing the emails field and removing a duplicate metadata file in apply-setters.

Reviewed changes

Copilot reviewed 33 out of 36 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/update_function_docs/main.go Removes legacy Go-based doc update CLI.
scripts/update_function_docs/git.go Removes legacy git helper for doc updater.
scripts/update_function_docs/function_release.go Removes legacy tag/URL rewrite logic for docs/examples.
scripts/update_function_docs/go.mod Removes legacy module definition for doc updater.
scripts/update_function_docs/go.sum Removes legacy dependency lockfile for doc updater.
scripts/patch_reader/main.go Removes legacy patch version helper CLI.
scripts/patch_reader/pkg/latestpatch/latestpatch.go Removes legacy git-tag scanning logic for latest patch discovery.
scripts/patch_reader/go.mod Removes legacy module definition for patch reader.
scripts/patch_reader/go.sum Removes legacy dependency lockfile for patch reader.
scripts/generate_docs/generate_docs.sh Adds new Hugo doc generation/sync script.
scripts/generate_docs/validate_metadata.sh Adds schema validation script for metadata.yaml.
functions/go/metadata-schema.json Adds JSON Schema for Go function metadata.
functions/go/apply-setters/metadata.yaml Removes emails field from metadata.
functions/go/apply-replacements/metadata.yaml Removes emails field from metadata.
functions/go/create-setters/metadata.yaml Removes emails field from metadata.
functions/go/ensure-name-substring/metadata.yaml Removes emails field from metadata.
functions/go/gatekeeper/metadata.yaml Removes emails field from metadata.
functions/go/generate-kpt-pkg-docs/metadata.yaml Removes emails field from metadata.
functions/go/list-setters/metadata.yaml Removes emails field from metadata.
functions/go/remove-local-config-resources/metadata.yaml Removes emails field from metadata.
functions/go/render-helm-chart/metadata.yaml Removes emails field from metadata.
functions/go/search-replace/metadata.yaml Removes emails field from metadata.
functions/go/set-annotations/metadata.yaml Removes emails field from metadata.
functions/go/set-enforcement-action/metadata.yaml Removes emails field from metadata.
functions/go/set-image/metadata.yaml Removes emails field from metadata.
functions/go/set-labels/metadata.yaml Removes emails field from metadata.
functions/go/set-namespace/metadata.yaml Removes emails field from metadata.
functions/go/sleep/metadata.yaml Removes emails field from metadata.
functions/go/starlark/metadata.yaml Removes emails field from metadata.
functions/go/upsert-resource/metadata.yaml Removes emails field from metadata.
functions/go/apply-setters/krm-fn-metadata.yaml Removes duplicate legacy metadata file.
RELEASING.md Updates release/docs workflow to use the new generation script.
README.md Updates documentation pointers and fixes a wording typo.
Makefile Replaces update-function-docs with validate-metadata target.
.gitignore Stops ignoring removed patch_reader binary; adds .local/.
.github/workflows/ci.yaml Adds CI job to validate metadata against the schema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/generate_docs/validate_metadata.sh Outdated
Comment thread scripts/generate_docs/validate_metadata.sh Outdated
Comment thread scripts/generate_docs/validate_metadata.sh Outdated
Comment thread RELEASING.md Outdated
Comment thread scripts/generate_docs/generate_docs.sh Outdated
Comment thread scripts/generate_docs/generate_docs.sh Outdated
@CsatariGergely CsatariGergely added the documentation Improvements or additions to documentation label Apr 16, 2026
@efiacor efiacor marked this pull request as draft April 16, 2026 09:50
efiacor added 3 commits April 16, 2026 14:24
…scripts

Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
@efiacor efiacor force-pushed the add_docs_gen_mech branch from 4538572 to 209b13c Compare April 16, 2026 13:26
@efiacor efiacor marked this pull request as ready for review April 16, 2026 13:42
@efiacor efiacor requested a review from CsatariGergely April 16, 2026 13:42
@liamfallon liamfallon merged commit 1e793a2 into kptdev:main Apr 16, 2026
12 checks passed
@efiacor efiacor deleted the add_docs_gen_mech branch April 16, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants