Skip to content

feat: github teams sync#105

Merged
Aiq0 merged 3 commits into
masterfrom
github
Jul 14, 2026
Merged

feat: github teams sync#105
Aiq0 merged 3 commits into
masterfrom
github

Conversation

@Aiq0

@Aiq0 Aiq0 commented Jul 12, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds GitHub Teams synchronization to Trojsten ID by introducing a new GitHub sync module, wiring it into existing background jobs and signals, and exposing required configuration via settings and environment variables.

Changes:

  • Add GitHub Teams sync implementation and a management command to trigger it manually.
  • Extend the existing “group sync” background job to also sync GitHub teams, and trigger GitHub sync for a user when their GitHub SocialAccount is saved.
  • Add PyGithub dependency and configuration knobs (GITHUB_APP_*, GITHUB_ORG_NAME, GITHUB_TEAMS) to settings and .env.example.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
uv.lock Locks new dependency set including pygithub and transitive deps.
pyproject.toml Adds pygithub as an application dependency.
trojstenid/settings.py Adds GitHub provider config for allauth and new GitHub sync settings sourced from env.
.env.example Documents environment variables needed for GitHub sync.
trojstenid/users/github.py New GitHub Teams sync logic using GitHub App auth and org/team APIs.
trojstenid/users/tasks.py Renames/extends group sync job and adds a per-user GitHub sync job.
trojstenid/users/views.py Updates admin-triggered sync to call the new combined sync job.
trojstenid/users/signals.py Updates confirmed-email sync to new job; adds SocialAccount post-save hook for GitHub.
trojstenid/users/management/commands/syncgithubteams.py Adds CLI management command to run GitHub team sync.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread trojstenid/users/github.py Outdated
Comment thread trojstenid/users/github.py
Comment thread trojstenid/users/tasks.py Outdated
Comment thread trojstenid/users/views.py Outdated
Comment thread trojstenid/users/signals.py Outdated
Comment thread .env.example Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Aiq0 Aiq0 requested a review from gardenerik July 12, 2026 19:03
@Aiq0 Aiq0 merged commit 239eab6 into master Jul 14, 2026
2 checks passed
@Aiq0 Aiq0 deleted the github branch July 14, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants