예제 #1
0
 total_changes += chg_flag
 if not chg_flag: print("    OK Owners")
 print("  Looking for teams:", list(REPO_TEAMS[org_name].keys()))
 org_repos = [repo for repo in org.get_repos()]
 teams = org.get_teams()
 chg_flag = 0
 for team in REPO_TEAMS[org_name]:
     flag = False
     for xteam in teams:
         if xteam.name == team:
             flag = True
             break
     if flag: continue
     print("    => Creating team", team)
     if not args.dryRun:
         create_team(GH_TOKEN, org_name, team, "cmssw team for " + team)
         chg_flag += 1
 total_changes += chg_flag
 if chg_flag: teams = org.get_teams()
 for team in teams:
     print("    Checking team:", team.name)
     api_rate_limits(gh, msg=False)
     team_info = {}
     try:
         team_info = REPO_TEAMS[org_name][team.name]
     except:
         print("    WARNING: New team found on Github:", team.name)
         err_code = 1
         continue
     members = team_info["members"]
     tm_members = [mem for mem in team.get_members()]
예제 #2
0
파일: gh-teams.py 프로젝트: gartung/cms-bot
 total_changes += chg_flag
 if not chg_flag: print("    OK Owners")
 print("  Looking for teams:", list(REPO_TEAMS[org_name].keys()))
 org_repos = [repo for repo in org.get_repos()]
 teams = org.get_teams()
 chg_flag = 0
 for team in REPO_TEAMS[org_name]:
     flag = False
     for xteam in teams:
         if xteam.name == team:
             flag = True
             break
     if flag: continue
     print("    => Creating team", team)
     if not args.dryRun:
         create_team(org_name, team, "cmssw team for " + team)
         chg_flag += 1
 total_changes += chg_flag
 org_members = [
     mem.login.encode("ascii", "ignore") for mem in org.get_members()
 ]
 print("  All members: ", org_members)
 if chg_flag: teams = org.get_teams()
 for team in teams:
     xfile = "%s-%s.done" % (org_name, team.name)
     if exists(xfile): continue
     print("    Checking team:", team.name)
     api_rate_limits(gh, msg=False)
     team_info = {}
     try:
         team_info = REPO_TEAMS[org_name][team.name]