Skip to content

Commit

Permalink
docs: updates README.md and sync-upstreams README.md (#160)
Browse files Browse the repository at this point in the history
* docs: updates README.md and sync-upstream README.md

The sync-upstreams information was missing from the top level README.md
and the description on the include_model_names and exclude_model_names
was a misleading.

Signed-off-by: Jennifer Power <[email protected]>

* docs: adds comment fixes in test files

Signed-off-by: Jennifer Power <[email protected]>

---------

Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 authored Jan 31, 2024
1 parent 55b9915 commit 3cd1c69
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The `rules-transform` action can be used when managing [OSCAL Component Definiti

The `create-cd` action can be used to create a new [OSCAL Component Definition](https://pages.nist.gov/OSCAL-Reference/models/v1.1.1/component-definition/json-outline/) in a trestle workspace. The action will create a new Component Definition JSON file and corresponding directories that contain rules YAML files and trestle-generated Markdown files. This action prepares the workspace for use with the `rules-transform` and `autosync` actions.

The `sync-upstreams` action can be used to sync and validate upstream OSCAL content stored in a git repository to a local trestle workspace. Which content is synced is determined by the `include_model_names` and `exclude_model_names` inputs.

### GitLab CI

> Coming Soon
Expand Down
4 changes: 2 additions & 2 deletions actions/sync-upstreams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ name: Example Workflow
| --- | --- | --- | --- |
| sources | A newline separated list of upstream sources to sync with a repo@branch format. For example, `https://github.com/myorg/myprofiles@main` | None | True |
| github_token | GitHub token used to make authenticated API requests | None | False |
| include_model_names | Comma-separated list of model names by name to include in the sync. For example, `component-definition,system-security-plan`. Defaults to all models. | None | False |
| exclude_model_names | Comma-separated list of model names to exclude from the sync. For example, `component-definition,system-security-plan` | None | False |
| include_model_names | Comma-separated glob pattern list of model names (i.e. trestle directory name) to include in the sync. For example, `*framework-v2`. Defaults to include all model names. | None | False |
| exclude_model_names | Comma-separated glob pattern of model names (i.e. trestle directory name) to exclude from the sync. For example, `*framework-v1`. Defaults to skip no model names. | None | False |
| skip_validation | Skip validation of the upstream OSCAL content. Defaults to false | false | False |
| commit_message | Commit message | Sync automatic updates | False |
| pull_request_title | Custom pull request title | Automatic updates from trestlebot | False |
Expand Down
4 changes: 2 additions & 2 deletions actions/sync-upstreams/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ inputs:
description: "GitHub token used to make authenticated API requests"
required: false
include_model_names:
description: "Comma-separated list of model names by name to include in the sync. For example, `component-definition,system-security-plan`. Defaults to all models."
description: "Comma-separated glob pattern list of model names (i.e. trestle directory name) to include in the sync. For example, `*framework-v2`. Defaults to include all model names."
required: false
exclude_model_names:
description: "Comma-separated list of model names to exclude from the sync. For example, `component-definition,system-security-plan`"
description: "Comma-separated glob pattern of model names (i.e. trestle directory name) to exclude from the sync. For example, `*framework-v1`. Defaults to skip no model names."
required: false
skip_validation:
description: "Skip validation of the upstream OSCAL content. Defaults to false"
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_e2e_compdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_create_cd_e2e(
command_args: Dict[str, str],
response: int,
) -> None:
"""Test the trestlebot rules transform command."""
"""Test the trestlebot create-cd command."""
# Check that the container image was built successfully
# and the mock server is running
exit_code, image_name = podman_setup
Expand Down
2 changes: 1 addition & 1 deletion tests/workflows/test_rules_transform_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) 2023 Red Hat, Inc.


"""Test the rules transformation workflow."""
"""Test the rules transformation workflow from a Task Class perspective."""

import os
import pathlib
Expand Down

0 comments on commit 3cd1c69

Please sign in to comment.