nix-security-tracker icon indicating copy to clipboard operation
nix-security-tracker copied to clipboard

Refactor receiver for allauth.signals.user_sign_up

Open alejandrosame opened this issue 7 months ago • 0 comments

As noted in https://github.com/Nix-Security-WG/nix-security-tracker/pull/165#discussion_r1682547683, the following refactor will improve the readability of the Github sync code and its test suite:

  • Move set_groups_for_new_user inside the GithubState class, and connect it to the user_sign_up signal within the constructor.
  • In the tests, trigger the signal and use @patch to mock the GitHub requests.

alejandrosame avatar Jul 18 '24 16:07 alejandrosame