obsidian-hub icon indicating copy to clipboard operation
obsidian-hub copied to clipboard

Detect if plugin has been deprecated and move to new "Discontinued plugins"

Open claremacrae opened this issue 4 years ago • 4 comments

Edit This originally referred to Deprecated but we're going to use Discontinued instead, as a more commonly used word.

claremacrae avatar Dec 11 '21 13:12 claremacrae

One comment about this is that I've seen "Deprecated" not-well-understood even by people whose first language is English.

It would be nice if we could find a more commonly-understood word.

claremacrae avatar Dec 11 '21 13:12 claremacrae

To know whether a plugin has been archived or not, one needs to use the GitHub API:

import requests

repo = "user/plugin-name"
headers = {"Accept": "application/vnd.github.v3+json"}
    response = requests.get(
        "https://api.github.com/repos/{}".format(repo), headers=headers
)

r = response.json()
is_archived = r.get("archived")

Since the API has a rate limit, and we exceed the 60 requests per hour for unauthenticated users just with the plugins, we'll need to set up GitHub actions or personal access tokens for the terminal.

argenos avatar Dec 27 '21 19:12 argenos

Ways to tell if a plugin has been discontinued:

claremacrae avatar Apr 04 '22 10:04 claremacrae