gpt4 book ai didi

github - 如何获取问题的拉取请求引用

转载 作者:行者123 更新时间:2023-12-04 18:00:11 25 4
gpt4 key购买 nike

鉴于 GitHub 问题,是否有任何方法可以通过 API 获取引用该问题的拉取请求?

该信息显示在 GitHub html 页面中,但我在 API 文档中看不到任何内容。

真的可以吗?

最佳答案

is there any way to get the pull requests that reference to that issue via API

不是直接的。
即使是 reverse is not possible ,因为拉取请求有一个链接“issue”指向...本身。

但如the issue API中所述:

In the past, pull requests and issues were more closely aligned than they are now.
As far as the API is concerned, every pull request is an issue, but not every issue is a pull request.

This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key.

因此您需要列出拉取请求的评论(使用 Issue Comments API,因为对 PR 的评论是用它完成的),并解析所述评论以找到对问题的引用。

关于github - 如何获取问题的拉取请求引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36530350/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com