#print(f"- {reaction.content}: by {reaction.user.login}")
ifreaction.content=="+1":
total_votes_for+=1
elifreaction.content=="-1":
total_votes_against+=1
print(f"Total votes for resolution: {str(total_votes_for)}")
print(f"Total votes against resolution: {str(total_votes_against)}")
if(total_votes_for/len(core_team_logins))>0.5:
print("This RFC should be passed. Adding comment.")
issue.create_comment("This resolution has enough votes from Core Team mebers to be considered passed. Please close the issue once appropriate actions have been taken. - Beep Boop (I'm a bot, and this action was performed automatically)")
issue.lock("resolved")
else:
print("Not enough votes to pass")
formemberincore_team_members:
core_team_logins.append(member.login)
forissueinrepo.get_issues():
if'RFC'inissue.title:
print(f"Working on: {issue.title}")
all_reactions=issue.get_reactions()
ifall_reactions.totalCount!=0:
total_votes_for=0
total_votes_against=0
forreactioninall_reactions:
ifreaction.user.loginincore_team_logins:
#print(f"- {reaction.content}: by {reaction.user.login}")
ifreaction.content=="+1":
total_votes_for+=1
elifreaction.content=="-1":
total_votes_against+=1
print(f"Total votes for resolution: {str(total_votes_for)}")
print(f"Total votes against resolution: {str(total_votes_against)}")
if(total_votes_for/len(core_team_logins))>0.5:
print("This RFC should be passed. Adding comment.")
issue.create_comment("This resolution has enough votes from Core Team mebers to be considered passed. Please close the issue once appropriate actions have been taken. - Beep Boop (I'm a bot, and this action was performed automatically)")