You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't have the bandwidth at the moment to implement this, but I did a little bit of research and thinking, which I'm sharing here: similar to Forgejo, the autodetection is a little bit fragile. There's no endpoint we can hit that'd 100% tell us its sourcehut. However, sourcehut has API endpoints that are unique among the supported forges (just like Forgejo): /api/user will return a 401, which tells us that the endpoint exists. It's a rather generic endpoint, but none of the other forges use it, so it's not terrible.
Thus, checking if /api/user returns 401 is a reasonably strong indication that we're dealing with SourceHut.
The text was updated successfully, but these errors were encountered:
Hrm. There's a downside of /api/user: the REST API is in the process of being deprecated, and replaced with a GraphQL API, which is at /query - and that one is way too generic, and there's nothing particularly identifiable there.
I don't have the bandwidth at the moment to implement this, but I did a little bit of research and thinking, which I'm sharing here: similar to Forgejo, the autodetection is a little bit fragile. There's no endpoint we can hit that'd 100% tell us its sourcehut. However, sourcehut has API endpoints that are unique among the supported forges (just like Forgejo):
/api/user
will return a 401, which tells us that the endpoint exists. It's a rather generic endpoint, but none of the other forges use it, so it's not terrible.Thus, checking if
/api/user
returns 401 is a reasonably strong indication that we're dealing with SourceHut.The text was updated successfully, but these errors were encountered: