Skip to content

authz: Move GitLab token refresh to code host sync

Administrator requested to merge rs/gitlab-refresh-service-sync into main

Created by: ryanslade

Specifically for user added code hosts.

Before, we were doing this as part of permissions syncing which meant that sometimes when a code host sync happened the token hadn't been refreshed yet. This change moves the refresh closer to where it needs to be.

Mostly a simply code move but needed to introduce context.Context to the Sourcer interface so the blast radius was a little bigger than intended.

Test plan

Existing unit test still pass. Tested locally.

Merge request reports

Loading