Skip to content

repo-create: verification choking on 'visibility' field when 'private' rather than '-' #74

@salewski

Description

@salewski

This issue pertains to the ads-github-repo-create program, as shipped with ads-github-tools-0.3.3 (released 2021-03-27):

    $ ads-github-repo-create --version
    ads-github-repo-create 0.3.3  (built: 2021-03-27 23:43:15)

    Copyright (C) 2020 Alan D. Salewski <ads@salewski.email>
    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Written by Alan D. Salewski.

Looks like the output from the GitHub v3 API endpoint

   /repos/:owner/:repo

changed to include a value for the 'visibility' field where it used to either provide an empty string (or possibly no field at all?):

    $ ads-github-repo-create --verbose -p -I -W -P -d 'Some blurb' -- 'my-repo'
    ads-github-repo-create (info): GitHub repo owner is: my-username
    ads-github-repo-create (info): GitHub repository does not yet exist: my-username/my-repo
    ads-github-repo-create (info): attempting to create new GitHup repo: my-username/my-repo
    ads-github-repo-create (info): successfully created new GitHup repo: my-username/my-repo
    ads-github-repo-create (info): new repo verification: repo name....ok
    ads-github-repo-create (info): new repo verification: 'fork' flag....ok
    ads-github-repo-create (info): new repo verification: 'archived' flag....ok
    ads-github-repo-create (info): new repo verification: 'disabled' flag....ok
    ads-github-repo-create (info): new repo verification: 'created_at' field....ok
    ads-github-repo-create (info): new repo verification: 'updated_at' field....ok
    ads-github-repo-create (info): new repo verification: 'private' flag....ok
    ads-github-repo-create (info): new repo verification: 'visibility' field...
    ads-github-repo-create (error): newly repo verification: expected 'visibility' field to be "-", but have "private"; bailing out

I glanced at the code and found comments that mention visibility as applicable only to GitHub Enterprise customers, so maybe something has changed in that regard. I'll have to circle back on it -- don't have time to research it right now.

Note that no workaround should be needed assuming we get this fixed relatively quickly. Manual verification confirmed that the repo gets created as intended (assuming there is no other problem); it is only the automated verification checking that chokes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions