mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Fix date format for milestone creation (#593)
This commit is contained in:
committed by
Jason White
parent
cbfe8d0f62
commit
e671fdd035
@@ -983,7 +983,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
||||
if description is not github.GithubObject.NotSet:
|
||||
post_parameters["description"] = description
|
||||
if due_on is not github.GithubObject.NotSet:
|
||||
post_parameters["due_on"] = due_on.strftime("%Y-%m-%d")
|
||||
post_parameters["due_on"] = due_on.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
headers, data = self._requester.requestJsonAndCheck(
|
||||
"POST",
|
||||
self.url + "/milestones",
|
||||
|
||||
@@ -4,7 +4,7 @@ api.github.com
|
||||
None
|
||||
/repos/jacquev6/PyGithub/milestones
|
||||
{'Content-Type': 'application/json', 'Authorization': 'Basic login_and_password_removed', 'User-Agent': 'PyGithub/Python'}
|
||||
{"due_on": "2012-06-15", "state": "open", "description": "Description created by PyGithub", "title": "Milestone created by PyGithub"}
|
||||
{"due_on": "2012-06-15T00:00:00Z", "state": "open", "description": "Description created by PyGithub", "title": "Milestone created by PyGithub"}
|
||||
201
|
||||
[('status', '201 Created'), ('x-ratelimit-remaining', '4958'), ('content-length', '604'), ('server', 'nginx/1.0.13'), ('connection', 'keep-alive'), ('x-ratelimit-limit', '5000'), ('etag', '"bb5eb08c923020c102396cd0c9bfdbc5"'), ('date', 'Sat, 19 May 2012 10:24:13 GMT'), ('content-type', 'application/json; charset=utf-8'), ('location', 'https://api.github.com/repos/jacquev6/PyGithub/milestones/5')]
|
||||
{"closed_issues":0,"url":"https://api.github.com/repos/jacquev6/PyGithub/milestones/5","due_on":"2012-06-15T07:00:00Z","creator":{"avatar_url":"https://secure.gravatar.com/avatar/b68de5ae38616c296fa345d2b9df2225?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jacquev6","gravatar_id":"b68de5ae38616c296fa345d2b9df2225","login":"jacquev6","id":327146},"number":5,"open_issues":0,"title":"Milestone created by PyGithub","created_at":"2012-05-19T10:24:13Z","state":"open","description":"Description created by PyGithub","id":121463}
|
||||
|
||||
Reference in New Issue
Block a user