Skip to content

[Schema Inaccuracy] "Create an organization repository" team_id parameter is not useful and missing information #3689

Open
@tonglil

Description

@tonglil

Schema Inaccuracy

https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-an-organization-repository

The id passed in this field only sets the team with read access.

  1. This information is not documented
  2. This is not useful as one expects the team specified during repo creation would receive admin access, in particular as repos created by GitHub App installations because then the repo is created without any admin access to anyone.
  3. It would be better if the parameter allowed specifying level of access.

Expected

At least document that the field only grants the team_id team read-only access.

Reproduction Steps

  gh api \
    --silent \
    --method POST \
    -H "Accept: application/vnd.github+json" \
    "/orgs/$org/repos" \
    -f name="some-repo" \
    -F team_id="$team_id"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions