check_candidacy: check OSF member and print info
Reflect OSF member validation into check_candidacy which are already on check_all_candidacies and ci_check_all_candidate_files. Also print member affiliation if available. Change-Id: I14454f8a5cc7ddeef8ad30faab6d790f7c5670aa
This commit is contained in:
@@ -26,6 +26,18 @@ def check_candidate(project_name, email, projects, limit=1, verbose=0):
|
|||||||
return dt.strftime('%Y-%m-%d')
|
return dt.strftime('%Y-%m-%d')
|
||||||
|
|
||||||
found = 0
|
found = 0
|
||||||
|
|
||||||
|
# OSF member validation with verbose output
|
||||||
|
member = utils.lookup_member(email, verbose=1)
|
||||||
|
is_valid = member.get('data', []) != []
|
||||||
|
if is_valid is False:
|
||||||
|
print('Email address not found in OSF member list')
|
||||||
|
return found
|
||||||
|
|
||||||
|
# Print member affiliation if available
|
||||||
|
print('Affiliation: %s' % (utils.current_member_affiliation(member)))
|
||||||
|
|
||||||
|
# Looking for validating changes
|
||||||
branch = None
|
branch = None
|
||||||
timeframe = utils.conf['timeframe']
|
timeframe = utils.conf['timeframe']
|
||||||
owner = utils.get_gerrit_account(email)['username']
|
owner = utils.get_gerrit_account(email)['username']
|
||||||
|
|||||||
Reference in New Issue
Block a user