feat: less Mattermost events (#27)

Co-authored-by: CHHC-L <136193358+serkini@users.noreply.github.com>
This commit is contained in:
CHHC-L 2023-09-28 09:51:22 +08:00 committed by GitHub
parent c1bf2ecf3a
commit a169a8b61c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 8 deletions

3
.env.example vendored
View File

@ -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"]

View File

@ -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`

View File

@ -31,7 +31,7 @@ class Settings(BaseSettings):
mattermost_access_token: str = ""
mattermost_team: str = ""
mattermost_teaching_team: List[str] = [
"manuel",
"charlem",
]
# sid

View File

@ -115,15 +115,9 @@ class Mattermost:
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",
],