osgithub 0.3.4__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
osgithub/github.py CHANGED
@@ -434,13 +434,25 @@ class GithubRepo:
434
434
  "date": content["committer"]["date"],
435
435
  }
436
436
 
437
+ def get_contributors(self):
438
+ """
439
+ Gets contributors to the repo
440
+
441
+ Returns:
442
+ List of strings, each representing a contributor's login
443
+ """
444
+ path_segments = [*self.repo_path_segments, "contributors"]
445
+ content = self.client.get_json(path_segments)
446
+ contrib_list = [contrib["login"] for contrib in content]
447
+ return contrib_list
448
+
437
449
  def clear_cache(self):
438
450
  """Clears all request cache urls for this repo"""
439
451
  cached_urls = self.client.session.cache.urls()
440
452
  repo_path = f"{self.owner}/{self.name}".lower()
441
- for cached_url in cached_urls:
442
- if repo_path in cached_url.lower():
443
- self.client.session.cache.delete_url(cached_url)
453
+ self.client.session.cache.delete(
454
+ urls=filter(lambda url: repo_path in url.lower(), cached_urls)
455
+ )
444
456
 
445
457
 
446
458
  class GithubContentFile:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: osgithub
3
- Version: 0.3.4
3
+ Version: 0.4.0
4
4
  Summary: UNKNOWN
5
5
  Home-page: https://github.com/opensafely-core/osgithub
6
6
  Author: OpenSAFELY
@@ -0,0 +1,7 @@
1
+ osgithub/__init__.py,sha256=vrAHXxc09rCnV6gUzgkxGx0-XPF6FIMOe-zm047Ng8E,189
2
+ osgithub/github.py,sha256=c7UgMXNZxm9gfbnLGSSFS3sKx4avtevwqOu_Yvx59uA,16239
3
+ osgithub-0.4.0.dist-info/LICENSE,sha256=3dYRqvpnIRI1ISbzwG_EKRHulT5qzYLacVDM09Ehn5Y,675
4
+ osgithub-0.4.0.dist-info/METADATA,sha256=TaIt5o24SHLjnEJXnW9a_4V8-U0l-CsHRhx1Y46rk84,418
5
+ osgithub-0.4.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
6
+ osgithub-0.4.0.dist-info/top_level.txt,sha256=g_IFstxnkPa9O17yPWMKz75iq3dlZ6uQmkJUu9OXHFw,9
7
+ osgithub-0.4.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +0,0 @@
1
- osgithub/__init__.py,sha256=vrAHXxc09rCnV6gUzgkxGx0-XPF6FIMOe-zm047Ng8E,189
2
- osgithub/github.py,sha256=Zhuh8jwoO_TMcYSAB7pCsX3cyDyjUYPsDYDHA1SPYQ8,15868
3
- osgithub-0.3.4.dist-info/LICENSE,sha256=3dYRqvpnIRI1ISbzwG_EKRHulT5qzYLacVDM09Ehn5Y,675
4
- osgithub-0.3.4.dist-info/METADATA,sha256=mmW_h3eWms3yX1wiSw-Cx8TdCZYeI3fxQcjv_ZL0DNc,418
5
- osgithub-0.3.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
- osgithub-0.3.4.dist-info/top_level.txt,sha256=g_IFstxnkPa9O17yPWMKz75iq3dlZ6uQmkJUu9OXHFw,9
7
- osgithub-0.3.4.dist-info/RECORD,,