Skip to content

Commit

Permalink
Skip CLOSED PRS to redeploy and show at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
guilleJB committed Oct 22, 2023
1 parent ffc1890 commit 41f494c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apply_pr/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ def prs_status(
PRS = {}
ERRORS = []
TO_APPLY = []
CLOSED_PRS = []
IN_PROJECTS = []
rep = GHAPIRequester(owner, repository)
def get_prs_info(plist):
Expand Down Expand Up @@ -912,7 +913,9 @@ def get_prs_info(plist):
if milestone != '(With out Milestone)' and vsn.parse(milestone) <= vsn.parse(version):
if state_pr.upper() != 'MERGED':
message = colors.yellow(message)
if not projects:
if state_pr.upper() == 'CLOSED':
CLOSED_PRS.append(to_apply)
elif not projects:
TO_APPLY.append(to_apply)
else:
IN_PROJECTS.append(to_apply)
Expand Down Expand Up @@ -945,6 +948,10 @@ def get_prs_info(plist):
print(colors.magenta('\nIncluded in projects\n'))
for x in IN_PROJECTS:
print(colors.magenta('* {}'.format(x)))
if CLOSED_PRS:
print(colors.red('\nClosed PRS: "{}"\n'.format(
' '.join(CLOSED_PRS)
)))
print(colors.yellow(
'\nNot Included: "{}"\n'.format(' '.join(TO_APPLY))
))
Expand Down

0 comments on commit 41f494c

Please sign in to comment.