Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectsV2? #155

Closed
aronchick opened this issue Nov 19, 2022 · 2 comments
Closed

ProjectsV2? #155

aronchick opened this issue Nov 19, 2022 · 2 comments

Comments

@aronchick
Copy link

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?

@AlexandreODelisle
Copy link

All endpoints of ghapi are base on REST API V3.

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

@aronchick
Copy link
Author

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

@jph00 jph00 closed this as completed Mar 30, 2024
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

No branches or pull requests

3 participants