-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Daniel Brauer <[email protected]>
- Loading branch information
Showing
3 changed files
with
103 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,81 +4,85 @@ | |
} | ||
|
||
|
||
GITHUB_USER_DATA = ([ | ||
{ | ||
'hasTwoFactorEnabled': None, | ||
'node': { | ||
'url': 'https://example.com/hjsimpson', | ||
'login': 'hjsimpson', | ||
'name': 'Homer Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Springfield Nuclear Power Plant', | ||
GITHUB_USER_DATA = ( | ||
[ | ||
{ | ||
'hasTwoFactorEnabled': None, | ||
'node': { | ||
'url': 'https://example.com/hjsimpson', | ||
'login': 'hjsimpson', | ||
'name': 'Homer Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Springfield Nuclear Power Plant', | ||
}, | ||
'role': 'MEMBER', | ||
}, { | ||
'hasTwoFactorEnabled': None, | ||
'node': { | ||
'url': 'https://example.com/lmsimpson', | ||
'login': 'lmsimpson', | ||
'name': 'Lisa Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'role': 'MEMBER', | ||
}, { | ||
'hasTwoFactorEnabled': True, | ||
'node': { | ||
'url': 'https://example.com/mbsimpson', | ||
'login': 'mbsimpson', | ||
'name': 'Marge Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'role': 'ADMIN', | ||
}, | ||
'role': 'MEMBER', | ||
}, { | ||
'hasTwoFactorEnabled': None, | ||
'node': { | ||
'url': 'https://example.com/lmsimpson', | ||
'login': 'lmsimpson', | ||
'name': 'Lisa Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'role': 'MEMBER', | ||
}, { | ||
'hasTwoFactorEnabled': True, | ||
'node': { | ||
'url': 'https://example.com/mbsimpson', | ||
'login': 'mbsimpson', | ||
'name': 'Marge Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'role': 'ADMIN', | ||
}], | ||
GITHUB_ORG_DATA | ||
], | ||
GITHUB_ORG_DATA, | ||
) | ||
|
||
# Subtle differences between owner data and user data: | ||
# 1. owner data does not include a `hasTwoFactorEnabled` field (it in unavailable in the GraphQL query for these owners) | ||
# 2. an `organizationRole` field instead of a `role` field. In owner data, membership within an org is not assumed, so | ||
# there is an 'UNAFFILIATED' value for owners of an org who are not also members of it. (Otherwise the 'OWNER' | ||
# organizationRole matches the 'ADMIN' role in the user data, and the 'DIRECT_MEMBER' organizationRole matches the 'MEMBER' role.) | ||
GITHUB_ENTERPRISE_OWNER_DATA = ([ | ||
{ | ||
'node': { | ||
'url': 'https://example.com/kbroflovski', | ||
'login': 'kbroflovski', | ||
'name': 'Kyle Broflovski', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'South Park Elementary', | ||
}, | ||
'organizationRole': 'UNAFFILIATED', | ||
}, { | ||
'node': { | ||
'url': 'https://example.com/mbsimpson', | ||
'login': 'mbsimpson', | ||
'name': 'Marge Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
# organizationRole matches the 'ADMIN' role in the user data, and the 'DIRECT_MEMBER' organizationRole matches | ||
# the 'MEMBER' role.) | ||
GITHUB_ENTERPRISE_OWNER_DATA = ( | ||
[ | ||
{ | ||
'node': { | ||
'url': 'https://example.com/kbroflovski', | ||
'login': 'kbroflovski', | ||
'name': 'Kyle Broflovski', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'South Park Elementary', | ||
}, | ||
'organizationRole': 'UNAFFILIATED', | ||
}, { | ||
'node': { | ||
'url': 'https://example.com/mbsimpson', | ||
'login': 'mbsimpson', | ||
'name': 'Marge Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'organizationRole': 'OWNER', | ||
}, { | ||
'node': { | ||
'url': 'https://example.com/lmsimpson', | ||
'login': 'lmsimpson', | ||
'name': 'Lisa Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'organizationRole': 'DIRECT_MEMBER', | ||
}, | ||
'organizationRole': 'OWNER', | ||
}, { | ||
'node': { | ||
'url': 'https://example.com/lmsimpson', | ||
'login': 'lmsimpson', | ||
'name': 'Lisa Simpson', | ||
'isSiteAdmin': False, | ||
'email': '[email protected]', | ||
'company': 'Simpson Residence', | ||
}, | ||
'organizationRole': 'DIRECT_MEMBER', | ||
}], | ||
GITHUB_ORG_DATA | ||
], | ||
GITHUB_ORG_DATA, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters