diff --git a/.env.example b/.env.example index ffe3b31..ea33025 100644 --- a/.env.example +++ b/.env.example @@ -2,3 +2,6 @@ CANVAS_ACCESS_TOKEN=CiBD8fLtEhUOkcjdKhIj18Fx13WV1e3hwffewrfN3whAcS1IKPeJ41fBKq1E CANVAS_COURSE_ID=1445 GITEA_ACCESS_TOKEN=10cdf70f8fe1b7a5d3321e5a10d2d743e4818d4a GITEA_ORG_NAME=VG101 +MATTERMOST_TEAM=VG101 +MATTERMOST_ACCESS_TOKEN=qjnpxytsgpdnxfbpyhrinzdapl +MATTERMOST_TEACHING_TEAM=["A", "B", "C"] diff --git a/README.md b/README.md index 5d9a841..a363501 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ close all issues and pull requests in gitea organization create channels for student groups according to group information on gitea. Optionally specify a prefix to ignore all repos whose names do not start with it. Optionally specify a suffix to add to all channels created. -Example: `python3 -m joint_teapot create_channels_for_groups --prefix p1 -suffix -private` will fetch all repos whose names start with `"p1"` and create channels on mm for these repos like "p1team1-private". Members of a repo will be added to the corresponding channel. +Example: `python3 -m joint_teapot create-channels-on-mm --prefix p1 --suffix -private --invite-teaching-team` will fetch all repos whose names start with `"p1"` and create channels on mm for these repos like "p1team1-private". Members of a repo will be added to the corresponding channel. And teaching team (adjust in `.env`) will be invited to the channels. ### `create-issues` diff --git a/joint_teapot/config.py b/joint_teapot/config.py index 3c8eab9..9d4a15c 100644 --- a/joint_teapot/config.py +++ b/joint_teapot/config.py @@ -31,7 +31,7 @@ class Settings(BaseSettings): mattermost_access_token: str = "" mattermost_team: str = "" mattermost_teaching_team: List[str] = [ - "manuel", + "charlem", ] # sid diff --git a/joint_teapot/workers/mattermost.py b/joint_teapot/workers/mattermost.py index 98ddada..b1beff2 100644 --- a/joint_teapot/workers/mattermost.py +++ b/joint_teapot/workers/mattermost.py @@ -115,15 +115,9 @@ def create_webhooks_for_repos(self, repos: List[str], gitea: Gitea) -> None: active=True, type="slack", events=[ - "create", - "delete", - "push", - "release", "issues_only", - "issue_assign", "issue_comment", "pull_request_only", - "pull_request_assign", "pull_request_comment", "pull_request_review", ],