-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Feature in format-checker: RepoArchived-check #383
base: main
Are you sure you want to change the base?
Conversation
it should report error when a repo with status 'repoArchived' but it 's not archived.
add one dependency: requests
add log function for archived status error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this PR is quite similar to #334 I would prefer merging that one first and then for some caching of requests.get(project_url)
to be used in this PR so that at most we only make one request for each unique Project URL instead of making one for fork checking, one for repo archive, etc.
Thanks for your changes in the meantime!
format_checker/common_checks.py
Outdated
log_archived_error(filename, log, i, row, "Project URL") | ||
except requests.exceptions.RequestException as e: | ||
# handle(e) | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of simply passing here, it would be good to warn that the check for repo archived failed along with outputting the exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get it, I change pass
to log_esp_error(filename, log, "The check for repo-archived failed due to ERROR:" + str(e))
yes the PR is similar to #334, maybe the two funcitions can merge into one ?
(a) Changes overview:
RepoArchived
statusRepoArchived
status(b) Some test results showing the changes work by running
python3 format_checker/main.py
check the archived repo in proposed PR without
RepoArchived
statuscheck the non-archived repo in proposed PR but with
RepoArchived
status