dmitri.shuralyov.com/app/changes/component

delete support for change.{Approved,ChangesRequested}Event

These events have been superseded by change.Review and its State field,
and removed from the change package. Delete support for them.

Follows https://dmitri.shuralyov.com/service/change/...$commit/9a7a6e8aef50bf7dceb93c681ed6446f3fdfa0b0.
dmitshur committed 5 years ago commit 3c6a68559ec8cd18b4cee7840b40ddddeb42e7e5
Showing partial commit. Full Commit
Collapse all
component/component.go
@@ -78,16 +78,10 @@ func (e Event) icon() *html.Node {
		case "comment":
			icon = octicon.X()
		default:
			panic("unreachable")
		}
	case change.ApprovedEvent:
		icon = octicon.Check()
		color, backgroundColor = "#fff", "#6cc644"
	case change.ChangesRequestedEvent:
		icon = octicon.X()
		color, backgroundColor = "#fff", "#bd2c00"
	default:
		icon = octicon.PrimitiveDot()
	}
	return &html.Node{
		Type: html.ElementNode, Data: atom.Span.String(),
@@ -170,14 +164,10 @@ func (e Event) text() []*html.Node {
		case "comment":
			return []*html.Node{htmlg.Text("deleted a comment")}
		default:
			panic("unreachable")
		}
	case change.ApprovedEvent:
		return []*html.Node{htmlg.Text("approved this change")}
	case change.ChangesRequestedEvent:
		return []*html.Node{htmlg.Text("requested changes")}
	default:
		return []*html.Node{htmlg.Text("unknown event")} // TODO: See if this is optimal.
	}
}