sindresorhus/refined-github

Org icon broken #2830

casperdcl posted onGitHub

Private orgs used to have a lock icon. Now all orgs (both private and public) have a crossed-out eye (?)

image

In the screenshot, membership of the org on the left is private, while the one on the right is public. I've verified this by logging out (which makes the private org disappear).

Note that I have a personal token configured and haven't made any changes to it since it was working. I can also confirm that the token does have the correct permissions to see the orgs:

$ curl https://api.github.com/users/casperdcl/orgs
... # lists public orgs
$ curl -H "Authorization: token $GH_API_TOKEN" https://api.github.com/user/orgs
... # includes private orgs

That is because the URLs for organizations have changed on GitHub:

<img width="444" alt="Screen Shot 2020-02-25 at 11 34 20 PM" src="https://user-images.githubusercontent.com/412895/75293856-62a26480-5827-11ea-85a2-a827453d2cf8.png">

Here the URL is https://github.com/organizations/getferdi?type=source (previously https://github.com/getferdi?type=source, without organizations/).
The relevant part is:

https://github.com/sindresorhus/refined-github/blob/825f4fd51efaef62a5f131a83b2c7a2cc14116ee/source/features/mark-private-orgs.tsx#L27

publicOrganizations is publicOrganizationsNames, org is of type HTMLAnchorElement and org.pathname.slice(1) results in organizations/getferdi. We would need to get rid of the organizations/ there for the condition above to properly resolve.

posted by kytwb about 5 years ago

This is great. There are a few features that would benefit from this piece of information being readily available (e.g. they no longer have to look for body.org to detect an organization profile for example)

Also page-detect needs to be updated.

I’m sure there are other features that are broken because of this too

posted by fregante about 5 years ago

Fund this Issue

$0.00
Funded

Pull requests