Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: less Mattermost events #27

Merged
merged 3 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion joint_teapot/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Settings(BaseSettings):
mattermost_access_token: str = ""
mattermost_team: str = ""
mattermost_teaching_team: List[str] = [
"manuel",
"charlem",
]

# sid
Expand Down
6 changes: 0 additions & 6 deletions joint_teapot/workers/mattermost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
Expand Down