Refined-github: Org icon broken

Created on 25 Feb 2020  路  2Comments  路  Source: sindresorhus/refined-github

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
bug

All 2 comments

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

Screen Shot 2020-02-25 at 11 34 20 PM

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.

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鈥檓 sure there are other features that are broken because of this too

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yakov116 picture yakov116  路  3Comments

Arcanemagus picture Arcanemagus  路  3Comments

durka picture durka  路  3Comments

vanniktech picture vanniktech  路  3Comments

alexanderadam picture alexanderadam  路  3Comments