Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better prompts and defaults when adding by URL and adding masterfiles via cfbs init #194

Merged
merged 7 commits into from
May 29, 2024

Conversation

olehermanse
Copy link
Member

  • cfbs.json: added_by now documents when a masterfiles module was added by "cfbs init"
  • cfbs init: Specifically add the masterfiles module from the masterfiles repo URL
  • cfbs add: Now adds all modules from URL if user presses enter or passes --non-interactive
  • cfbs add: Now skips the prompt if a repo added by URL only has 1 module
  • cfbs add: Added information about dependencies when adding modules by URL
  • cfbs add: Fixed issue printing empty list of modules before erroring when adding by URL
  • cfbs add: Now prompts to add individual modules after user says no to add all from URL

@olehermanse olehermanse force-pushed the master branch 2 times, most recently from 482a5f8 to 32400ff Compare May 28, 2024 16:24
@nickanderson
Copy link
Member

SUBSCRIBED.

… by "cfbs init"

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
…es repo URL

Previously we were telling the add command to add a module from
masterfiles repo URL at a specific commit, but not specifying which
module to add, resulting in an extra prompt.

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
…es --non-interactive

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Ticket: CFE-3863
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
… URL

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
…when adding by URL

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
… add all from URL

Ticket: CFE-4015
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Copy link
Member

@nickanderson nickanderson left a comment

Choose a reason for hiding this comment

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

Good changes IMHO. Suggestion to provide example input if answer no to default policy set question.

prompt_user(
non_interactive,
"Specify policy set to use instead (empty to skip)",
default="",
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps an example response. I guess, but am not sure that I should provide a module repo URL and perhaps a module name, maybe a commit sha in the URL?

Copy link
Contributor

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

Nice 🚀

@olehermanse olehermanse merged commit c11a09d into cfengine:master May 29, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants