3

I'm trying to fetch projects from a github repo using PyGithub 1.58.1.

I created those projects manually in browser and I can see them. 

But when I see repo.get_projects().totalCount, it's giving 0

and when I try to create a project, it says

github.GithubException.GithubException: 410 {"message": "Projects are disabled for this repository", "documentation_url": "https://docs.github.com/v3/projects"}

But I see repo.has_projects returning True

Same issue when using curl as well.

The PAT I'm using contains all the permissions in the settings page.

What am I missing here?

6
  • 1
    Could this be down to pygithub only supporting classic projects? I don't think you can create classic projects anymore. Commented Apr 17, 2023 at 19:20
  • 1
    stackoverflow.com/questions/73268885/… Commented Apr 17, 2023 at 19:26
  • @DustinWyatt Yes. That's the same response I got from github support too. Commented Apr 18, 2023 at 5:32
  • 1
    Here's some code I wrote yesterday for doing this: gist.github.com/dmwyatt/efaf240205d0f48b2d593f45a721f5b9 Commented Apr 18, 2023 at 14:59
  • 1
    I'm really just learning the API as I go along. I think you should be able to do that, but you'll have to explore the GraphQL API with their explorer tool here: docs.github.com/en/graphql/overview/explorer It's good, but not super-intuitive either. Make sure you check out the buttons along the top side, and if you hover over keywords in the editor, you get a docs popup that you can click keywords inside of. Commented Apr 21, 2023 at 15:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.