通过API编辑GitHub问题

2024-09-28 21:18:21 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用API编辑GitHub问题的主体。我在请求库中使用一个python应用程序

url = "https://GHE_server.company_name.com/api/v3/repos/org_name/repo_name/issues/1/"    
payload = {
      "title": "New title"
        }
    response = requests.patch(url, json=payload, headers={}, auth=(_USERNAME_, _TOKEN_), verify=_CA_CERT_)

我得到的答复是:

{'message': 'Not Found', 'documentation_url': 'https://developer.github.com/enterprise/2.13/v3'}

我查看了This Answer,这使我将有效负载更改为=json vice data。但我还是撞到墙了。任何帮助都将不胜感激


Tags: namehttpsgithubcomapijson应用程序url