Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bridges.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ var bridgeNotifications = map[BridgeType][]BridgeUpdateNotification{
Meowlnir: {},
}

// Branches other than main/master which are treated as the latest image, per bridge.
// These only apply to the listed bridge: a branch with the same name in any other
// bridge repo won't be retagged as latest nor notified about.
// The full set of branches treated as the latest image, per bridge. A bridge listed
// here uses only these branches: main/master are not implicitly included, so pushes
// to them are neither retagged as latest nor notified about.
var bridgeLatestBranchOverrides = map[BridgeType][]string{
BridgeDiscord: {"megadiscord"},
BridgeGoogleMessages: {"experimental"},
Expand All @@ -132,10 +132,10 @@ var targetImageRepoOverrides = map[BridgeType]string{
}

func (bridgeType BridgeType) IsLatestBranch(branch string) bool {
if branch == "main" || branch == "master" {
return true
if overrides, ok := bridgeLatestBranchOverrides[bridgeType]; ok {
return slices.Contains(overrides, branch)
}
return slices.Contains(bridgeLatestBranchOverrides[bridgeType], branch)
return branch == "main" || branch == "master"
}

func (bridgeType BridgeType) NotificationTargets() []BridgeUpdateNotification {
Expand Down
Loading