aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo')
-rw-r--r--MgaRepo/GitHub.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/MgaRepo/GitHub.py b/MgaRepo/GitHub.py
index 6d00d0f..d0bf998 100644
--- a/MgaRepo/GitHub.py
+++ b/MgaRepo/GitHub.py
@@ -22,6 +22,14 @@ class GitHub(object):
repository = self._organization.create_repo(pkgname, **kwargs)
return repository
+ def delete_repository(self, pkgname, **kwargs):
+ repository = self.repository_exists(pkgname)
+ if repository:
+ print("deleting repository %s" % repository.full_name)
+ repository.delete()
+ return True
+ raise Error("repository %s doesn't exist!" % (self._organization.login+"/"+pkgname))
+
# workaround pygithub bug
@staticmethod
def __get_stats_commit_activity(self):