formats/GitHubWebhook.format.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
    <ViewDefinitions>
        <!-- Table View -->
        <View>
            <Name>GitHubWebhookTable</Name>
            <ViewSelectedBy>
                <TypeName>GitHubWebhook</TypeName>
            </ViewSelectedBy>
            <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>S </Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>R </Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>ID</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>GUID</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Event</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>StatusCode</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>DeliveredAt</Label>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Duration(s)</Label>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <!-- S(tatus) column -->
                            <TableColumnItem>
                                <ScriptBlock>
                                    if ($_.Status -eq 'ok') {
                                    [char]0x2705 + [char]0x200B
                                    } else {
                                    [char]0x274C + [char]0x200B
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                            <!-- R(edeliery) column -->
                            <TableColumnItem>
                                <!-- <PropertyName>Redelivery</PropertyName> -->
                                <ScriptBlock>
                                    if ($_.Redelivery -eq 'true') {
                                    "`u{1F504}"
                                    }
                                </ScriptBlock>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>ID</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>GUID</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Event</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>StatusCode</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>DeliveredAt</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>Duration</PropertyName>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl>
        </View>

        <!-- List View -->
        <View>
            <Name>GitHubWebhookList</Name>
            <ViewSelectedBy>
                <TypeName>GitHubWebhook</TypeName>
            </ViewSelectedBy>
            <ListControl>
                <ListEntries>
                    <ListEntry>
                        <ListItems>
                            <ListItem>
                                <Label>ID</Label>
                                <PropertyName>ID</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>GUID</Label>
                                <PropertyName>GUID</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>DeliveredAt</Label>
                                <PropertyName>DeliveredAt</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>Redelivery</Label>
                                <PropertyName>Redelivery</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>Duration (s)</Label>
                                <PropertyName>Duration</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>Status</Label>
                                <PropertyName>Status</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>StatusCode</Label>
                                <PropertyName>StatusCode</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>Event</Label>
                                <PropertyName>Event</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>Action</Label>
                                <PropertyName>Action</PropertyName>
                            </ListItem>
                        </ListItems>
                    </ListEntry>
                </ListEntries>
            </ListControl>
        </View>
    </ViewDefinitions>
</Configuration>