Skip to content

Commit

Permalink
chore: updates patterns to take a single input from the trestlebot CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Jul 5, 2023
1 parent 9cd4f19 commit b147e5a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
22 changes: 11 additions & 11 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ trap exec 3>&- EXIT

# Initialize the command variable
command="python3.8 -m trestlebot \
--markdown-path=${INPUT_MARKDOWN_PATH} \
--oscal-model=${INPUT_OSCAL_MODEL} \
--ssp-index-path=${INPUT_SSP_INDEX_PATH} \
--markdown-path=\"${INPUT_MARKDOWN_PATH}\" \
--oscal-model=\"${INPUT_OSCAL_MODEL}\" \
--ssp-index-path=\"${INPUT_SSP_INDEX_PATH}\" \
--commit-message=${INPUT_COMMIT_MESSAGE} \
--branch=${INPUT_BRANCH} \
--patterns=${INPUT_FILE_PATTERN} \
--committer-name=${INPUT_COMMIT_USER_NAME} \
--committer-email=${INPUT_COMMIT_USER_EMAIL} \
--author-name=${INPUT_COMMIT_AUTHOR_NAME} \
--author-email=${INPUT_COMMIT_AUTHOR_EMAIL} \
--skip-items=${INPUT_SKIP_ITEMS} \
--working-dir=${INPUT_REPOSITORY}"
--branch=\"${INPUT_BRANCH}\" \
--file-pattern=\"${INPUT_FILE_PATTERN}\" \
--committer-name=\"${INPUT_COMMIT_USER_NAME}\" \
--committer-email=\"${INPUT_COMMIT_USER_EMAIL}\" \
--author-name=\"${INPUT_COMMIT_AUTHOR_NAME}\" \
--author-email=\"${INPUT_COMMIT_AUTHOR_EMAIL}\" \
--working-dir=\"${INPUT_REPOSITORY}\" \
--skip-items=\"${INPUT_SKIP_ITEMS}\""

# Conditionally include flags
if [[ ${INPUT_SKIP_ASSEMBLE} == true ]]; then
Expand Down
9 changes: 4 additions & 5 deletions trestlebot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ def _parse_cli_arguments() -> argparse.Namespace:
help="OSCAL model type to run tasks on. Values can be catalog, profile, compdef, or ssp",
)
parser.add_argument(
"--patterns",
nargs="+",
type=str,
"--file-pattern",
required=True,
help="List of file patterns to include in repository updates",
type=str,
help="File pattern to be used with `git add` in repository updates",
)
parser.add_argument(
"--skip-items",
Expand Down Expand Up @@ -211,7 +210,7 @@ def run() -> None:
author_name=args.author_name,
author_email=args.author_email,
pre_tasks=pre_tasks,
patterns=args.patterns,
patterns=[args.file_pattern],
check_only=args.check_only,
)

Expand Down

0 comments on commit b147e5a

Please sign in to comment.