gpt4 book ai didi

github-api - 为什么 GitHub API 在拉取请求中返回未知的 mergeable_state?

转载 作者:行者123 更新时间:2023-12-03 23:50:48 26 4
gpt4 key购买 nike

有时,当我从 GitHub API 收到单个拉取请求时,响应包含在 JSON 响应中找到的以下属性:

  "merged": false,
"mergeable": null,
"mergeable_state": "unknown",
"merged_by": null,

这是为什么?如何确定此拉取请求是否可合并?在得到不同的响应之前,我真的需要重新加载拉取请求吗?

最佳答案

来自 GitHub 上的一个人:

The null value means that the mergeability of the pull request hasn't been computed yet. Mergeability is computed on demand and in the background, so when you fetch a pull request for which the mergeability isn't known -- you get back a null value but also a job is kicked off to compute the mergeability. If you make another request, you should see a non-null value for the mergeable attribute.



我想实现延迟重试是要走的路。

关于github-api - 为什么 GitHub API 在拉取请求中返回未知的 mergeable_state?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30619549/

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