From 1e109062ff5ea68e2d1221d495133a4ecc948199 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 24 Mar 2021 14:53:12 +0000 Subject: [PATCH] manifest: Add flatpak-external-data-checker integration This will automatically open PRs when new tags appear in the upstream repository. This uses the JSON checker rather than the Git checker because the Git checker cannot [currently][0] extract the timestamp from the Git tag, and would instead use today's date. fedc uses the Git tree hash to avoid duplicate PRs, so this would mean a new PR would be opened every day until one of them were merged. Unfortunately the JSON provided by GitLab does not include the date from the tag, only the date from the commit that the tag points to. As we will see in the subsequent commit, these are different, and it looks a bit weird that the release date is before the release name (itself a date). But this is relatively harmless, and importantly it is deterministic over time. [0]: https://github.com/flathub/flatpak-external-data-checker/issues/154 --- org.gnome.Boxes.Extension.OsinfoDb.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/org.gnome.Boxes.Extension.OsinfoDb.json b/org.gnome.Boxes.Extension.OsinfoDb.json index 7a634fa..608902b 100644 --- a/org.gnome.Boxes.Extension.OsinfoDb.json +++ b/org.gnome.Boxes.Extension.OsinfoDb.json @@ -34,7 +34,16 @@ "type": "git", "url": "https://gitlab.com/libosinfo/osinfo-db.git", "commit": "d316eee8d82a28664d28bb3fa0c889cd05985c0e", - "tag": "v20210215" + "tag": "v20210215", + "x-checker-data": { + "type": "json", + "url": "https://gitlab.com/api/v4/projects/libosinfo%2Fosinfo-db/repository/tags", + "tag-query": "first | .name", + "commit-query": "first | .commit.id", + "timestamp-query": "first | .commit.committed_date", + "version-query": "$tag | sub(\"^[vV]\"; \"\")", + "is-main-source": true + } } ] }