Skip to content

Commit

Permalink
manifest: Add flatpak-external-data-checker integration
Browse files Browse the repository at this point in the history
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]: flathub-infra/flatpak-external-data-checker#154
  • Loading branch information
wjt committed Mar 24, 2021
1 parent 732e256 commit 1877e3c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion org.gnome.Boxes.Extension.OsinfoDb.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}
Expand Down

0 comments on commit 1877e3c

Please sign in to comment.