Skip to content

gh repo create does not include description if a template is used #3931

@ciaransweet

Description

@ciaransweet

Describe the bug

Version: gh version 1.11.0 (2021-06-03)

When you create a repository in the form of gh repo create <name> --description "a-description" --template <a-template> --public --confirm, the repository doesn't get the description you provided, the field is completely blank when you visit the repository.

Steps to reproduce the behavior

  1. Create a template repository
  2. $ git init new-repo && cd new-repo
  3. $ gh repo create new-repo --description "this does not appear" --template <template> --public --confirm
  4. Go to the repository on GitHub, the About/Description section is blank

Expected vs actual behavior

I expect the description I pass to a repository on creation to be there when it's created.

I can create a repository through the GitHub UI with a template, provide it a description and the description is there as expected.

I can also create a repository with gh cli without a template and the description is there as expected.

Logs

WITH TEMPLATE

$ git init blah-blah && cd blah-blah
Initialized empty Git repository in /Users/ciaran/dev/blah-blah/.git/
$ gh repo create blah-blah --description "this does not appear" --template pangeo-forge/feedstock-template --public --confirm
✓ Created repository ciaranevans/blah-blah on GitHub
✓ Added remote git@github.com:ciaranevans/blah-blah.git

image

WITHOUT TEMPLATE

$ git init blah-blah && cd blah-blah
Initialized empty Git repository in /Users/ciaran/dev/blah-blah/.git/
$ gh repo create blah-blah --description "this appears" --public --confirm
✓ Created repository ciaranevans/blah-blah on GitHub
✓ Added remote git@github.com:ciaranevans/blah-blah.git

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions