我看到 github3.py 在 Repository.create_pull() 上仍然没有 Repository.create_issue() 中的属性标签。但是在 ShortPullRequest 上创建了属性标签。所以我尝试了:
created_pr = repo.create_pull(
title=pr.title,
body=pr.body,
head=pr.head,
base=pr.base,
)
if pr.labels:
created_pr.labels = pr.labels
created_pr.update()
问题是我在 GitHub 上查看后,创建的 PR 没有标签。有没有使用这个组件的解决方案?
注意:我不能使用 pygithub,因为他们使用 LGPL 许可证,我想制作 MIT 许可证代码。