Skip to content

Commit

Permalink
github: switch users' primary URL from web site to github profile URL
Browse files Browse the repository at this point in the history
for #158
  • Loading branch information
snarfed committed Dec 7, 2018
1 parent e0ceab5 commit a20cdc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions granary/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,11 +843,11 @@ def user_to_actor(cls, user):

# extract web site links. extract_links uniquifies and preserves order
urls = sum((util.extract_links(user.get(field)) for field in (
'html_url', # REST
'url', # both
'websiteUrl', # GraphQL
'blog', # REST
'bio', # both
'html_url', # REST
'url', # both
)), [])
urls = [u for u in urls if util.domain_from_link(u) != 'api.github.com']
if urls:
Expand Down
4 changes: 2 additions & 2 deletions granary/tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ def tag_uri(name):
'image': {'url': 'https://avatars2.githubusercontent.com/u/778068?v=4'},
'id': tag_uri('MDQ6VXNlcjc3ODA2OA=='),
'published': '2011-05-10T00:39:24+00:00',
'url': 'https://snarfed.org/',
'url': 'https://github.com/snarfed',
'urls': [
{'value': 'https://github.com/snarfed'},
{'value': 'https://snarfed.org/'},
{'value': 'https://brid.gy/'},
{'value': 'https://github.com/snarfed'},
],
'username': 'snarfed',
'email': 'github@ryanb.org',
Expand Down

0 comments on commit a20cdc4

Please sign in to comment.