Skip to content

adds --description value to the gh command - #6

Merged
azimux merged 3 commits into
foobara:mainfrom
zhephyn:feature/use-description-value-for-github-repo
Sep 22, 2026
Merged

azimux merged 3 commits into
foobara:mainfrom
zhephyn:feature/use-description-value-for-github-repo

Conversation

@zhephyn

@zhephyn zhephyn commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #4

Comment thread src/write_empty_ruby_project_to_disk.rb Outdated
@zhephyn

zhephyn commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Ended up using shell words to address the issue. However I'm curious if a helper approach would've been better. Something like this:

def shell_escape_single_quote(str)
  "'" + str.gsub("'", "'\\''") + "'"
end

and then this

cmd = "gh repo create --private #{project_config.org_slash_project_kebab} --description #{shell_escape_single_quote(project_config.description)}"

However shell words is not a dependency and comes with ruby itself so maybe it could be fine for use. The helper approach would have been better if maybe by using shell words we were adding a new dependency. wdyt?

Comment thread src/write_empty_ruby_project_to_disk.rb
@azimux
azimux merged commit 00b6dd7 into foobara:main Sep 22, 2026
2 checks passed
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.

Use --description value for the github repo via gh if possible

2 participants