[sysadmin-bin] Fix creating new repositories
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Fix creating new repositories
- Date: Thu, 31 Oct 2019 10:24:06 +0000 (UTC)
commit 100ab155c8bb50147ea45ec73d8a8dbdc3b8b906
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Thu Oct 31 11:24:11 2019 +0100
Fix creating new repositories
git/post-receive-mirror-github | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/git/post-receive-mirror-github b/git/post-receive-mirror-github
index 49790cf..0d38dd4 100755
--- a/git/post-receive-mirror-github
+++ b/git/post-receive-mirror-github
@@ -72,11 +72,7 @@ class GitHub:
return True
- def create_github_repo(self, **kwargs):
- required_parameters = ['name', 'description', 'homepage']
- if not all([arg in kwargs for arg in required_parameters]):
- raise TypeError("Function requires name, description and homepage keyword arguments")
-
+ def create_github_repo(self, name, description, homepage):
payload = json.dumps({
'name': self.normalize_name(name),
'description': description,
@@ -224,7 +220,7 @@ def main():
github_repo_exists = gh.check_if_repo_exists(repo_name)
if not github_repo_exists:
- gh.create_github_repo(**doap_settings)
+ gh.create_github_repo(doap_settings['name'], doap_settings['description'], doap_settings['homepage'])
github_settings = gh.get_github_repo(repo_name)
github_repo_name = gh.normalize_name(repo_name)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]