Skip to content

Commit

Permalink
adjust PR artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 committed Jul 1, 2024
1 parent 9ecf296 commit fbdb9bd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions utils/LinkChecker/cklcresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def AppendLineToPreviousKey(cr, key, line):

linkOK = True
if '200' not in r['Result'][:20]:
if r['Result'] == 'Valid':
if r['Result'][:5] == 'Valid':
if 'Warning' in r.keys() and 'Redirected' not in r['Warning']:
linkOK = False
else:
Expand Down Expand Up @@ -128,6 +128,13 @@ def AppendLineToPreviousKey(cr, key, line):
if (nowdate - date).days > 90:
bad_links += [x]

#
# Sometimes, we can get duplicate entries in the lists.
# Remove any of those now.
#
trouble_links = list(set(trouble_links))
bad_links = list(set(bad_links))

#
# Update trouble_links file if modified
#
Expand All @@ -145,4 +152,7 @@ def AppendLineToPreviousKey(cr, key, line):
if len(bad_links) > bad_links_original_size:
with open(bad_links_out, 'w') as file:
for rec in bad_links:
file.write(str(rec)+'\n')
if ghEvent == 'pull_request':
file.write(+str(rec['ParentURL'][41:]+', '+str(rec['URL']+'\n')
else:
file.write(str(rec)+'\n')

0 comments on commit fbdb9bd

Please sign in to comment.