ghapi icon indicating copy to clipboard operation
ghapi copied to clipboard

ProjectsV2?

Open aronchick opened this issue 2 years ago • 2 comments

I'm seeing some weirdness in re: ProjectsV2. Specifically, this command:

gh api graphql -f query='
  query{
  node(id: "PVT_kwDOAU_qk84AHJ4X") {
    ... on ProjectV2 {
      fields(first: 20) {
        nodes {
          ... on ProjectV2Field {
            id
            name
          }
          ... on ProjectV2IterationField {
            id
            name
            configuration {
              iterations {
                startDate
                id
              }
            }
          }
          ... on ProjectV2SingleSelectField {
            id
            name
            options {
              id
              name
            }
          }
        }
      }
    }
  }
}'

Works fine against this repo (https://github.com/orgs/filecoin-project/projects/65/views/1).

However, the same thing in the API:

gh_token = os.getenv("GITHUB_TOKEN")
api = GhApi(owner="filecoin-project", token=gh_token)

p = api.projects.list_columns(node="PVT_kwDOAU_qk84AHJ4X", per_page=20, page=0)
print(f"{p.title} - {p.id}")

Returns not found. Querying issues normally works. Could this be a v2 issue?

aronchick avatar Nov 19 '22 00:11 aronchick

All endpoints of ghapi are base on REST API V3.

ProjectV2 only exist in GraphQL from what I see in GitHub documentation.

AlexandreODelisle avatar Nov 20 '22 00:11 AlexandreODelisle

oh rats - so i have to do it all by hand then? sigh. thanks

aronchick avatar Nov 22 '22 18:11 aronchick