Browse Source

Edit checkgithubdates to add archived status (#3145)

pull/3159/head
Kieran 2 years ago
committed by GitHub
parent
commit
5d9f553463
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      tests/check-github-commit-dates.py

4
tests/check-github-commit-dates.py

@ -40,7 +40,7 @@ __status__ = "Production"
access_token = os.environ['GITHUB_TOKEN'] access_token = os.environ['GITHUB_TOKEN']
""" find all URLs of the form https://github.com/owner/repo """ """ find all URLs of the form https://github.com/owner/repo """
with open('README.md', 'r') as readme:
with open('README.md', encoding="utf8") as readme:
data = readme.read() data = readme.read()
project_urls = re.findall('https://github.com/[A-z]*/[A-z|0-9|\-|_|\.]+', data) project_urls = re.findall('https://github.com/[A-z]*/[A-z|0-9|\-|_|\.]+', data)
@ -57,4 +57,4 @@ g = Github(access_token)
for url in urls: for url in urls:
project = re.sub('https://github.com/', '', url) project = re.sub('https://github.com/', '', url)
repo = g.get_repo(project) repo = g.get_repo(project)
print(str(repo.pushed_at) + ' https://github.com/' + project)
print(str(repo.pushed_at) + ' https://github.com/' + project + ' archived:' + str((repo.archived)))
Loading…
Cancel
Save