kubescape / regolibrary

The regolibrary package contains the controls Kubescape uses for detecting misconfigurations in Kubernetes manifests.
Apache License 2.0
120 stars 48 forks source link

create documentation pipeline to update and maintain control docs #541

Closed TRohit20 closed 11 months ago

TRohit20 commented 11 months ago

PR Type:

Enhancement


PR Description:

This PR introduces an automated documentation generation and synchronization pipeline for the control library. The main changes include:


PR Main Files Walkthrough:

files: - `scripts/upload-readme.py`: The script has been heavily modified to generate static markdown files for each control. This includes adding detailed comments to the functions, and modifying the `create_md_for_control` function to generate markdown text for each control. - `.github/workflows/sync.yml`: This new file defines a GitHub action that triggers on changes to the `docs/controls` directory. It uses the `BetaHuhn/repo-file-sync-action@v1` action to open a pull request that syncs the changes to the `kubescape.io` website repository. - `.github/workflows/create-release.yaml`: The workflow has been updated to execute the documentation generator script with every release. - `.github/sync.yml`: This new file specifies the source and destination directories for the synchronization process. It indicates that the `docs/controls` directory should be synced to the `docs/docs/controls/` directory in the `kubescape/kubescape.io` repository.

User Description:

Overview

As part of the LFX mentorship, creating a documentation pipeline to automatically generate and update the controls library documentation.

codiumai-pr-agent-free[bot] commented 11 months ago

PR Analysis

How to use

Instructions

To invoke the PR-Agent, add a comment using one of the following commands: /review: Request a review of your Pull Request. /describe: Update the PR title and description based on the contents of the PR. /improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback. /ask \<QUESTION>: Ask a question about the PR. /update_changelog: Update the changelog based on the PR's contents. /add_docs: Generate docstring for new components introduced in the PR. /generate_labels: Generate labels for the PR based on the PR's contents. see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value. For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." To list the possible configuration parameters, add a /config comment.

TRohit20 commented 11 months ago

Closing this PR as I am having issues squashing all the commits that I had not signed off on over the course of testing the workflow. So opening a New PR