-
Notifications
You must be signed in to change notification settings - Fork 2
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
add -p
/ --project
to add a github project
#11
Labels
Comments
Miou-zora
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Mar 8, 2023
Miou-zora
changed the title
feature: add
add Mar 16, 2023
-p
/ --github-project
to add a github project-p
/ --github-project
to add a github project
Miou-zora
changed the title
add
add Jul 10, 2023
-p
/ --github-project
to add a github project-p
/ --project
to add a github project
Currently pygithub is unable to create github project from repository or user, when I try to do these, I got this: Traceback (most recent call last):
File "/home/miouzora/Replic/main.py", line 91, in <module>
main()
File "/home/miouzora/Replic/main.py", line 82, in main
generate_mirror(sshParser.organizationName, sshParser.repositoryName, github, mirror_name, args.project)
File "/home/miouzora/Replic/src/generate_mirror.py", line 42, in generate_mirror
user.create_project(project)
File "/home/miouzora/Replic/src/Github/User.py", line 58, in create_project
return self.user.create_project(name, body=body)
File "/home/miouzora/.local/lib/python3.10/site-packages/github/AuthenticatedUser.py", line 610, in create_project
headers, data = self._requester.requestJsonAndCheck(
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Requester.py", line 401, in requestJsonAndCheck
*self.requestJson(
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Requester.py", line 501, in requestJson
return self.__requestEncode(cnx, verb, url, parameters, headers, input, encode)
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Requester.py", line 571, in __requestEncode
requestHeaders["Content-Type"], encoded_input = encode(input)
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Requester.py", line 499, in encode
return "application/json", json.dumps(input)
File "/usr/lib/python3.10/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.10/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type _NotSetType is not JSON serializable for repository: Traceback (most recent call last):
File "/home/miouzora/Replic/main.py", line 91, in <module>
main()
File "/home/miouzora/Replic/main.py", line 82, in main
generate_mirror(sshParser.organizationName, sshParser.repositoryName, github, mirror_name, args.project)
File "/home/miouzora/Replic/src/generate_mirror.py", line 42, in generate_mirror
mirror.create_project(project)
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Repository.py", line 1382, in create_project
headers, data = self._requester.requestJsonAndCheck(
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Requester.py", line 400, in requestJsonAndCheck
return self.__check(
File "/home/miouzora/.local/lib/python3.10/site-packages/github/Requester.py", line 425, in __check
raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 410 {"message": "Projects are disabled for this repository", "documentation_url": "https://docs.github.com/v3/projects"} Please look at this issue from pygithub that talk about it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add
-p
/--project
flag to create automatically a github project and link it to the mirror like this:or
The text was updated successfully, but these errors were encountered: