ghapi
ghapi copied to clipboard
ProjectsV2?
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?
All endpoints of ghapi
are base on REST API V3.
ProjectV2 only exist in GraphQL from what I see in GitHub documentation.
oh rats - so i have to do it all by hand then? sigh. thanks