使用 github api 检查两个分支的可合并性而不创建 PR
check mergeability of two branches using the github api without creating a PR
我在这里评论的问题:
How to check mergeability of a branches using the github api
是否可以在不进行 PR 的情况下使用 github API 检查两个分支的可合并性?我不想通过创建 PR 来触发任何东西,即使我之后立即删除了 PR。
您可以尝试使用 GitHub API compare commits (which can be used for branches), as I illustrated here。
这会给你一个状态:
"status": "behind",
"ahead_by": 1,
"behind_by": 2,
如果你只看到前方:分支将很容易合并(快进)。
如果前后都看到……可能会有冲突,但更难确定。
我在这里评论的问题: How to check mergeability of a branches using the github api
是否可以在不进行 PR 的情况下使用 github API 检查两个分支的可合并性?我不想通过创建 PR 来触发任何东西,即使我之后立即删除了 PR。
您可以尝试使用 GitHub API compare commits (which can be used for branches), as I illustrated here。
这会给你一个状态:
"status": "behind",
"ahead_by": 1,
"behind_by": 2,
如果你只看到前方:分支将很容易合并(快进)。
如果前后都看到……可能会有冲突,但更难确定。