From d02e65eccb50b31ebe51e571f148c77c9bddf68a Mon Sep 17 00:00:00 2001 From: James Tanner Date: Fri, 25 Aug 2023 08:35:26 -0400 Subject: [PATCH 1/2] Expose the true github ID in the v1 user serializer. No-Issue Signed-off-by: James Tanner (cherry picked from commit 843d01732341e15637e1d8e376ae6406b17f2e22) --- galaxy/api/serializers/users.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/galaxy/api/serializers/users.py b/galaxy/api/serializers/users.py index e0db61d97..55ba01ada 100644 --- a/galaxy/api/serializers/users.py +++ b/galaxy/api/serializers/users.py @@ -3,6 +3,7 @@ from collections import OrderedDict from allauth.account.models import EmailAddress +from allauth.socialaccount.models import SocialAccount from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser @@ -18,7 +19,8 @@ USER_FIELDS = ( 'id', 'url', 'related', 'summary_fields', 'created', 'modified', - 'username', 'staff', 'full_name', 'date_joined', 'avatar_url' + 'username', 'staff', 'full_name', 'date_joined', 'avatar_url', + 'github_id' ) __all__ = [ @@ -55,6 +57,7 @@ def get_primary_email(self, obj): class UserSerializer(BaseSerializer): staff = serializers.ReadOnlyField(source='is_staff') + github_id = serializers.SerializerMethodField() class Meta: model = User @@ -93,3 +96,9 @@ def get_summary_fields(self, obj): ('github_repo', g.repository.github_repo) ]) for g in obj.starred.select_related('repository').all()] return d + + def get_github_id(self, obj): + social_user = SocialAccount.objects.filter(user_id=obj.id).first() + if social_user is None: + return None + return social_user.extra_data.get('id') From b04f3d55727c65bc5768d362e13fb0f475105ad1 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Mon, 21 Aug 2023 15:00:35 +0100 Subject: [PATCH 2/2] docker-compose is no more needed on CI (#3226) (cherry picked from commit ad11e1523103cce0f5d2c88f085207bb02dd1f41) --- .github/workflows/ci_unit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_unit.yml b/.github/workflows/ci_unit.yml index 198b7585b..12ab56b4d 100644 --- a/.github/workflows/ci_unit.yml +++ b/.github/workflows/ci_unit.yml @@ -29,8 +29,8 @@ jobs: # - name: Install LDAP requirements # run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential - - name: Install docker-compose - run: pip3 install --upgrade docker-compose + # - name: Install docker-compose + # run: pip3 install --upgrade docker-compose - name: build the image run: make dev/build