{"id":21258304,"url":"https://github.com/ubc/mattermost-sync","last_synced_at":"2025-07-11T02:32:31.726Z","repository":{"id":144966507,"uuid":"147998248","full_name":"ubc/mattermost-sync","owner":"ubc","description":"Sync LDAP groups to Mattermost Team","archived":false,"fork":false,"pushed_at":"2024-10-03T19:54:27.000Z","size":59,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-05T19:34:13.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-09T06:10:20.000Z","updated_at":"2022-10-07T00:39:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"247ac6bf-8b29-48ec-8eda-e4968a167e29","html_url":"https://github.com/ubc/mattermost-sync","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ubc/mattermost-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fmattermost-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fmattermost-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fmattermost-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fmattermost-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubc","download_url":"https://codeload.github.com/ubc/mattermost-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fmattermost-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264712811,"owners_count":23652664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T04:08:13.486Z","updated_at":"2025-07-11T02:32:31.721Z","avatar_url":"https://github.com/ubc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# As we decommissioned our instance, this repo will not be updated anymore. Please use the upstream repo for future updates.\n\n# Mattermost Sync\n\nThe script sync LDAP groups to Mattermost teams. The script will load\nroaster from LDAP, create Mattermost team if needed, create Mattermost\nstudent accounts and enrol them into the team.\n\n## Features\n\n* Handle multiple courses\n* Get configuration from environment variables\n\n## Deployment\n```\npip install -r requirement.txt\n```\n\n## Run\n```\npython sync.py \\\n  -u uid=BIND_USER \\\n  -p BIND_PASSWORD \\\n  -c PSYC_301_902_2018W \\\n  -r MATTERMOST_URL \\\n  -t MATTERMOST_ACCESS_TOKEN \\\n  -b ou=BASE,dc=id,dc=example,dc=com \\\n  -l ldaps://ldap.server.com:636 \\\n  -v DEBUG\n```\n\nRun `python sync.py --help` for more information\n\n### Course Name Spec\n\nThe base course name has to follow [ELDAP naming convention](https://confluence.it.ubc.ca/pages/viewpage.action?pageId=105318449).\n\nFor the course in UBCO, append 'O' at the end of the course name, e.g. CPSC_110_101_2018WO\n\nFor cross listed courses, use plus (`+`) for joining the course and equal (`=`) for the team name, e.g. CPSC_110_101_2018W+CPSC_120_102_2018W=MERGED-CPSC\n\nMattermost has some restrictions on team name as well: https://docs.mattermost.com/help/getting-started/creating-teams.html#team-name\n\nHere are some examples:\n\n| Course Name Spec | Team Name | Note |\n|------------------|-----------|------|\n| CPSC_101_201_2018W | CPSC10120118W | UBCV course |\n| CPSC_101_301_2018WO | CPSC10130118WO | UBCO course |\n| CPSC_101_101_2018W=CUSTOM-TEAM-NAME | CUSTOM-TEAM-NAME | Custom team name with linked the course |\n| CPSC_101_101_2018W+CPSC_101_102_2018W=XLISTED-CPSC-101| XLISTED-CPSC-101 | Cross list two CPSC section and custom team name |\n\n### Multiple Courses\n\nThe script can handle multiple courses by apply `-c/--course` parameter multiple times or use `COURSE_NAMES` environment variable with space separated course name spec list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fmattermost-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubc%2Fmattermost-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fmattermost-sync/lists"}