set up repository with predefined issue labels

pull/3/head
Langenfeld 2020-10-14 14:41:52 +02:00
rodzic e1b499599d
commit e9d45515d9
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -74,3 +74,4 @@ Tests can be run with:
```python3 -m pytest test_api.py```
Make sure to have a gitea-instance running on `http://localhost:3000`, and an admin-user token at `.token`.
The admin user must be named ``test``, with email ``secondarytest@test.org``.

Wyświetl plik

@ -697,7 +697,7 @@ class Gitea:
return user
def create_repo(self, repoOwner, repoName: str, description: str = "", private: bool = False, autoInit=True,
gitignores=None, license=None, readme="Default", ):
gitignores:str=None, license:str=None, readme:str="Default", issue_labels:str=None ):
""" Create a Repository.
Throws:
AlreadyExistsException, if Repository exists already.
@ -711,7 +711,7 @@ class Gitea:
Gitea.ADMIN_REPO_CREATE % repoOwner.username, data={"name": repoName, "description": description,
"private": private, "auto_init": autoInit,
"gitignores": gitignores, "license": license,
"readme": readme})
"issue_labels": issue_labels, "readme": readme})
if "id" in result:
self.logger.info("Successfully created Repository %s " % result["name"])
else: