feat: unwatch all repos
This commit is contained in:
parent
f9b6409e53
commit
cae195a4b5
|
@ -40,6 +40,10 @@ pytest -svv
|
||||||
|
|
||||||
archive all repos in gitea organization
|
archive all repos in gitea organization
|
||||||
|
|
||||||
|
### `unwatch-all-repos`
|
||||||
|
|
||||||
|
unwatch all repos in gitea organization
|
||||||
|
|
||||||
### `check-issues`
|
### `check-issues`
|
||||||
|
|
||||||
check the existence of issue by title on gitea
|
check the existence of issue by title on gitea
|
||||||
|
@ -124,7 +128,3 @@ upload assignment grades to canvas from grade file (GRADE.txt by default), read
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
|
|
||||||
## Compile
|
|
||||||
|
|
||||||
- case 0: 0
|
|
||||||
|
|
|
@ -128,6 +128,11 @@ def archive_all_repos() -> None:
|
||||||
tea.pot.gitea.archive_all_repos()
|
tea.pot.gitea.archive_all_repos()
|
||||||
|
|
||||||
|
|
||||||
|
@app.command("unwatch-all-repos", help="unwatch all repos in gitea organization")
|
||||||
|
def unwatch_all_repos() -> None:
|
||||||
|
tea.pot.gitea.unwatch_all_repos()
|
||||||
|
|
||||||
|
|
||||||
@app.command("get-no-collaborator-repos", help="list all repos with no collaborators")
|
@app.command("get-no-collaborator-repos", help="list all repos with no collaborators")
|
||||||
def get_no_collaborator_repos() -> None:
|
def get_no_collaborator_repos() -> None:
|
||||||
tea.pot.gitea.get_no_collaborator_repos()
|
tea.pot.gitea.get_no_collaborator_repos()
|
||||||
|
|
|
@ -415,6 +415,12 @@ class Gitea:
|
||||||
self.org_name, repo.name, body={"archived": True}
|
self.org_name, repo.name, body={"archived": True}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def unwatch_all_repos(self) -> None:
|
||||||
|
for repo in list_all(self.organization_api.org_list_repos, self.org_name):
|
||||||
|
self.repository_api.user_current_delete_subscription(
|
||||||
|
self.org_name, repo.name
|
||||||
|
)
|
||||||
|
|
||||||
def get_all_teams(self) -> Dict[str, List[str]]:
|
def get_all_teams(self) -> Dict[str, List[str]]:
|
||||||
res: Dict[str, List[str]] = {}
|
res: Dict[str, List[str]] = {}
|
||||||
for team in list_all(self.organization_api.org_list_teams, self.org_name):
|
for team in list_all(self.organization_api.org_list_teams, self.org_name):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user