UNION ALL
- -- Build added to repository
+ -- Build added to/moved repository
SELECT
- 'repository-build-added' AS type,
+ CASE
+ WHEN source_repo.repo_id IS NULL
+ THEN 'repository-build-added'
+ ELSE
+ 'repository-build-moved'
+ END AS type,
repository_builds.added_at AS t,
5 AS priority,
repository_builds.build_id AS build,
FROM
repository_builds
+ -- Attempt to find a match in a source repository
+ LEFT JOIN
+ repository_builds source_repo
+ ON
+ repository_builds.build_id = source_repo.build_id
+ AND
+ repository_builds.repo_id <> source_repo.repo_id
+ AND
+ repository_builds.added_at = source_repo.removed_at
+
UNION ALL
-- Build removed from repository
NULL AS points
FROM
repository_builds
+
+ -- Attempt to find a match in a destination repository
+ LEFT JOIN
+ repository_builds destination_repo
+ ON
+ repository_builds.build_id = destination_repo.build_id
+ AND
+ repository_builds.repo_id <> destination_repo.repo_id
+ AND
+ repository_builds.removed_at = destination_repo.added_at
WHERE
- removed_at IS NOT NULL
+ repository_builds.removed_at IS NOT NULL
+ AND
+ destination_repo.repo_id IS NULL
UNION ALL
<p class="icon is-large has-text-success">
<i class="fa-solid fa-2x fa-circle-plus"></i>
</p>
+ {% elif event.type == "repository-build-moved" %}
+ <p class="icon is-large has-text-success">
+ <i class="fa-solid fa-2x fa-circle-plus"></i>
+ </p>
{% elif event.type == "repository-build-removed" %}
<p class="icon is-large has-text-danger">
<i class="fa-solid fa-2x fa-circle-minus"></i>
{{ _("Mirror Went Offline") }}
{% elif event.type == "repository-build-added" %}
{{ _("Build has been added to repository %s") % event.repository }}
+ {% elif event.type == "repository-build-moved" %}
+ {{ _("Build has been moved to repository %s") % event.repository }}
{% elif event.type == "repository-build-removed" %}
{{ _("Build has been removed from repository %s") % event.repository }}
{% elif event.type == "release-monitoring-created" %}