Closed joethei closed 2 years ago
That's interesting. I guess there is an alternative approach to do this with the APIs instead of parsing HTML. Looks like if we don't provide the changelog manually, the fallback option is to fetch the commit message that belongs to the tag.
Tags API https://api.github.com/repos/joethei/obsidian-link-favicon/tags
gives the list of tags along with the commit URL.
[
{
"name": "1.7.1",
"zipball_url": "https://api.github.com/repos/joethei/obsidian-link-favicon/zipball/refs/tags/1.7.1",
"tarball_url": "https://api.github.com/repos/joethei/obsidian-link-favicon/tarball/refs/tags/1.7.1",
"commit": {
"sha": "48074ce010afcee27191607a1b0907a0e2ddec92",
"url": "https://api.github.com/repos/joethei/obsidian-link-favicon/commits/48074ce010afcee27191607a1b0907a0e2ddec92"
},
"node_id": "REF_kwDOGeuUeK9yZWZzL3RhZ3MvMS43LjE"
},
...
]
Following the commit URL, https://api.github.com/repos/joethei/obsidian-link-favicon/commits/48074ce010afcee27191607a1b0907a0e2ddec92
, the node root > commit > message
gives the message that you are targeting.
Will add the commit message as the fallback!
Fixed it. Please check, https://obsidian-plugin-stats.vercel.app/plugins/link-favicon
@joethei FYI on an unrelated point, if you add a tag link
to your GitHub repository, the plugin will show in the similar plugins when users are visiting other plugins tagged with the same tag (There is already a plugin using the tag link
. Hence, suggesting it)
When I open one of my plugins on this website, no changelogs are provided https://obsidian-plugin-stats.vercel.app/plugins/link-favicon But as you can see from the GitHub repo, I do indeed provide changelogs. https://github.com/joethei/obsidian-link-favicon/releases
This comes from GitHub having two ways to provide changelogs:
Both look mostly identical to the user.
While the manually written changelog can be retrieved from the API, the tag description cannot.
You will need to parse the HTML on the following page:
"https://github.com/" + plugin.Repo + "/releases/tag/" + release.GetTagName()"
and look for the following selector:[data-test-selector=tag-info]