INNER CODE UNIT · Python
comment
microsoft/botframework-sdk · dri/helpers.py:51
comment = [msg for msg in comments_paged][-1]
assert comment
return comment.user.login.strip().lower() in microsoft_members
def get_msorg_members(github, refresh_in_days=5):
"""Get members of the Microsoft github organization.
This is cached in the `members.txt` file.
If it gets stale (over `refresh_in_days` old), then refresh it.
"""
# See if we need to refresh the cache
members_fname = './members-do-not-check-in.txt'
member_updated = datetime.fromtimestamp(os.path.getmtime(members_fname))\
if os.path.exists(members_fname) else datetime.min
if datetime.now() - timedelta(days=refresh_in_days) > member_updated:
print('Your members cache is out of date. Refreshing.. (Could take several minutes)')
ms_org = github.get_organization('microsoft')