Hello,
I’m using Githubs API for releases. It returns a JSON list, with this structure
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/releases/1",
"html_url": "https://github.com/octocat/Hello-World/releases/v1.0.0",
"assets_url": "https://api.github.com/repos/octocat/Hello-World/releases/1/assets",
"upload_url": "https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
"tarball_url": "https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0",
"id": 1,
"tag_name": "v1.0.0",
"target_commitish": "master",
"name": "v1.0.0",
...
I would like to filter this list by a regex on the name field. I would like to match the first occurence of the regex with:
{{- range first 1 ( where $releases ".name" "=" "v1.0.[:digit:]" ) -}}
How can I do this in a correct way? I would like to filter the list and show the first matching element.
Thanks