File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,11 @@ func (u *User) IsIndividual() bool {
406
406
return u .Type == UserTypeIndividual
407
407
}
408
408
409
+ // IsBot returns whether or not the user is of type bot
410
+ func (u * User ) IsBot () bool {
411
+ return u .Type == UserTypeBot
412
+ }
413
+
409
414
// DisplayName returns full name if it's not empty,
410
415
// returns username otherwise.
411
416
func (u * User ) DisplayName () string {
Original file line number Diff line number Diff line change 1
- <a class="author text black gt-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>
1
+ <a class="author text black gt-font-semibold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>{{if .IsBot}}<span class="ui basic label gt-p-2">bot</span>{{end}}
You can’t perform that action at this time.
0 commit comments