本文整理匯總了Golang中github.com/google/go-github/github.Issue.Assignee方法的典型用法代碼示例。如果您正苦於以下問題:Golang Issue.Assignee方法的具體用法?Golang Issue.Assignee怎麽用?Golang Issue.Assignee使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/google/go-github/github.Issue
的用法示例。
在下文中一共展示了Issue.Assignee方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: bulkEditStart
func bulkEditStart(issues []*github.Issue) (*github.Issue, []byte) {
common := new(github.Issue)
for i, issue := range issues {
if i == 0 {
common.State = issue.State
common.Assignee = issue.Assignee
common.Labels = issue.Labels
common.Milestone = issue.Milestone
continue
}
if common.State != nil && getString(common.State) != getString(issue.State) {
common.State = nil
}
if common.Assignee != nil && getUserLogin(common.Assignee) != getUserLogin(issue.Assignee) {
common.Assignee = nil
}
if common.Milestone != nil && getMilestoneTitle(common.Milestone) != getMilestoneTitle(issue.Milestone) {
common.Milestone = nil
}
common.Labels = commonLabels(common.Labels, issue.Labels)
}
var buf bytes.Buffer
fmt.Fprintf(&buf, "State: %s\n", getString(common.State))
fmt.Fprintf(&buf, "Assignee: %s\n", getUserLogin(common.Assignee))
fmt.Fprintf(&buf, "Labels: %s\n", strings.Join(getLabelNames(common.Labels), " "))
fmt.Fprintf(&buf, "Milestone: %s\n", getMilestoneTitle(common.Milestone))
fmt.Fprintf(&buf, "\n<optional comment here>\n")
fmt.Fprintf(&buf, "%s\n", bulkHeader)
for _, issue := range issues {
fmt.Fprintf(&buf, "%d\t%s\n", getInt(issue.Number), getString(issue.Title))
}
return common, buf.Bytes()
}