本文整理匯總了Golang中k8s/io/contrib/mungegithub/github.MungeObject.UnassignPR方法的典型用法代碼示例。如果您正苦於以下問題:Golang MungeObject.UnassignPR方法的具體用法?Golang MungeObject.UnassignPR怎麽用?Golang MungeObject.UnassignPR使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類k8s/io/contrib/mungegithub/github.MungeObject
的用法示例。
在下文中一共展示了MungeObject.UnassignPR方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Munge
// Munge is the workhorse the will actually make updates to the PR
func (h AssignUnassignHandler) Munge(obj *github.MungeObject) {
if !obj.IsPR() {
return
}
comments, err := obj.ListComments()
if err != nil {
glog.Errorf("unexpected error getting comments: %v", err)
return
}
fileList, err := obj.ListFiles()
if err != nil {
glog.Errorf("Could not list the files for PR %v: %v", obj.Issue.Number, err)
return
}
//get ALL (not just leaf) the people that could potentially own the file based on the blunderbuss.go implementation
potentialOwners, _ := getPotentialOwners(*obj.Issue.User.Login, h.features, fileList, false)
toAssign, toUnassign := h.getAssigneesAndUnassignees(obj, comments, fileList, potentialOwners)
for _, username := range toAssign.List() {
obj.AssignPR(username)
}
obj.UnassignPR(toUnassign.List()...)
}