Skip to content

fix: --files-only --configure now substitutes placeholders (closes #75)#76

Open
TheCodingDragon0 wants to merge 1 commit intodjdarcy:mainfrom
TheCodingDragon0:fix/files-only-configure
Open

fix: --files-only --configure now substitutes placeholders (closes #75)#76
TheCodingDragon0 wants to merge 1 commit intodjdarcy:mainfrom
TheCodingDragon0:fix/files-only-configure

Conversation

@TheCodingDragon0
Copy link
Copy Markdown

Fixes #75

Problem

When running ghtraf create --files-only --configure, the --configure flag was ignored. The _run_files_only function dispatched immediately without checking for it, so placeholders like PLACEHOLDER, OWNER/REPO, and USER/GISTID were never substituted.

Root Cause

In run(), the --files-only check dispatches to _run_files_only(args) before any configure logic runs. The _run_files_only function never checked args.configure_files.

Fix

After deploying template files in _run_files_only, if --configure is passed:

  1. Read .ghtraf.json from the repo directory
  2. Run configure_dashboard, configure_readme, and configure_workflow
  3. All placeholders get substituted as expected

This makes the two-step workflow work:

ghtraf create --owner X --repo Y --configure --non-interactive  # cloud setup
ghtraf create --files-only --configure --non-interactive         # deploy + configure

…darcy#75)

When running 'ghtraf create --files-only --configure', the configure
flag was being ignored because _run_files_only dispatched immediately
without checking for it.

Now after deploying template files, if --configure is passed:
1. Reads .ghtraf.json from the repo directory
2. Runs configure_dashboard, configure_readme, and configure_workflow
3. Substitutes all placeholders (OWNER/REPO, PLACEHOLDER, USER/GISTID)

This fixes the two-step workflow where cloud setup runs first without
files existing, then --files-only copies templates but never configures
them.
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.

[BUG] --files-only --configure doesn't substitute placeholders when run after cloud setup

1 participant