Skip to content

Commit 3116e15

Browse files
committed
Merge branch 'main' into release
2 parents 900f4d5 + 205685e commit 3116e15

File tree

6 files changed

+64
-3
lines changed

6 files changed

+64
-3
lines changed

.github/workflows/build_frontend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ jobs:
4343
- run: bundle exec rails assets:precompile
4444
working-directory: ./server
4545

46+
- run: bundle exec rails webpacker:compile
47+
working-directory: ./server
48+
env:
49+
RAILS_ENV: production
50+
SECRET_KEY_BASE_DUMMY: 1
51+
4652
- if: ${{ inputs.branch == 'staging' }}
4753
run: mv -f lib/assets/favicon.staging.ico public/favicon.ico
4854
working-directory: ./server

client/src/app/generated/civic.apollo-helpers.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ export type BrowseTherapyEdgeFieldPolicy = {
385385
cursor?: FieldPolicy<any> | FieldReadFunction<any>,
386386
node?: FieldPolicy<any> | FieldReadFunction<any>
387387
};
388-
export type BrowseUserKeySpecifier = ('apiKeys' | 'areaOfExpertise' | 'bio' | 'country' | 'displayName' | 'email' | 'events' | 'evidenceCount' | 'facebookProfile' | 'id' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentConflictOfInterestStatement' | 'mostRecentEvent' | 'mostRecentOrganizationId' | 'name' | 'notifications' | 'orcid' | 'organizations' | 'organizationsWithEndorsementPrivileges' | 'profileImagePath' | 'ranks' | 'revisionCount' | 'role' | 'statsHash' | 'twitterHandle' | 'url' | 'username' | BrowseUserKeySpecifier)[];
388+
export type BrowseUserKeySpecifier = ('apiKeys' | 'areaOfExpertise' | 'bio' | 'country' | 'displayName' | 'email' | 'events' | 'evidenceCount' | 'facebookProfile' | 'id' | 'joinDate' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentConflictOfInterestStatement' | 'mostRecentEvent' | 'mostRecentOrganizationId' | 'name' | 'notifications' | 'orcid' | 'organizations' | 'organizationsWithEndorsementPrivileges' | 'profileImagePath' | 'ranks' | 'revisionCount' | 'role' | 'statsHash' | 'twitterHandle' | 'url' | 'username' | BrowseUserKeySpecifier)[];
389389
export type BrowseUserFieldPolicy = {
390390
apiKeys?: FieldPolicy<any> | FieldReadFunction<any>,
391391
areaOfExpertise?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -397,6 +397,7 @@ export type BrowseUserFieldPolicy = {
397397
evidenceCount?: FieldPolicy<any> | FieldReadFunction<any>,
398398
facebookProfile?: FieldPolicy<any> | FieldReadFunction<any>,
399399
id?: FieldPolicy<any> | FieldReadFunction<any>,
400+
joinDate?: FieldPolicy<any> | FieldReadFunction<any>,
400401
linkedinProfile?: FieldPolicy<any> | FieldReadFunction<any>,
401402
mostRecentActivityTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
402403
mostRecentConflictOfInterestStatement?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -1451,7 +1452,7 @@ export type LeaderboardRankFieldPolicy = {
14511452
actionCount?: FieldPolicy<any> | FieldReadFunction<any>,
14521453
rank?: FieldPolicy<any> | FieldReadFunction<any>
14531454
};
1454-
export type LeaderboardUserKeySpecifier = ('actionCount' | 'apiKeys' | 'areaOfExpertise' | 'bio' | 'country' | 'displayName' | 'email' | 'events' | 'facebookProfile' | 'id' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentConflictOfInterestStatement' | 'mostRecentEvent' | 'mostRecentOrganizationId' | 'name' | 'notifications' | 'orcid' | 'organizations' | 'organizationsWithEndorsementPrivileges' | 'profileImagePath' | 'rank' | 'ranks' | 'role' | 'statsHash' | 'twitterHandle' | 'url' | 'username' | LeaderboardUserKeySpecifier)[];
1455+
export type LeaderboardUserKeySpecifier = ('actionCount' | 'apiKeys' | 'areaOfExpertise' | 'bio' | 'country' | 'displayName' | 'email' | 'events' | 'facebookProfile' | 'id' | 'joinDate' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentConflictOfInterestStatement' | 'mostRecentEvent' | 'mostRecentOrganizationId' | 'name' | 'notifications' | 'orcid' | 'organizations' | 'organizationsWithEndorsementPrivileges' | 'profileImagePath' | 'rank' | 'ranks' | 'role' | 'statsHash' | 'twitterHandle' | 'url' | 'username' | LeaderboardUserKeySpecifier)[];
14551456
export type LeaderboardUserFieldPolicy = {
14561457
actionCount?: FieldPolicy<any> | FieldReadFunction<any>,
14571458
apiKeys?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -1463,6 +1464,7 @@ export type LeaderboardUserFieldPolicy = {
14631464
events?: FieldPolicy<any> | FieldReadFunction<any>,
14641465
facebookProfile?: FieldPolicy<any> | FieldReadFunction<any>,
14651466
id?: FieldPolicy<any> | FieldReadFunction<any>,
1467+
joinDate?: FieldPolicy<any> | FieldReadFunction<any>,
14661468
linkedinProfile?: FieldPolicy<any> | FieldReadFunction<any>,
14671469
mostRecentActivityTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
14681470
mostRecentConflictOfInterestStatement?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -2541,7 +2543,7 @@ export type UpdateSourceSuggestionStatusPayloadFieldPolicy = {
25412543
clientMutationId?: FieldPolicy<any> | FieldReadFunction<any>,
25422544
sourceSuggestion?: FieldPolicy<any> | FieldReadFunction<any>
25432545
};
2544-
export type UserKeySpecifier = ('apiKeys' | 'areaOfExpertise' | 'bio' | 'country' | 'displayName' | 'email' | 'events' | 'facebookProfile' | 'id' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentConflictOfInterestStatement' | 'mostRecentEvent' | 'mostRecentOrg' | 'mostRecentOrganizationId' | 'name' | 'notifications' | 'orcid' | 'organizations' | 'organizationsWithEndorsementPrivileges' | 'profileImagePath' | 'ranks' | 'role' | 'statsHash' | 'twitterHandle' | 'url' | 'username' | UserKeySpecifier)[];
2546+
export type UserKeySpecifier = ('apiKeys' | 'areaOfExpertise' | 'bio' | 'country' | 'displayName' | 'email' | 'events' | 'facebookProfile' | 'id' | 'joinDate' | 'linkedinProfile' | 'mostRecentActivityTimestamp' | 'mostRecentConflictOfInterestStatement' | 'mostRecentEvent' | 'mostRecentOrg' | 'mostRecentOrganizationId' | 'name' | 'notifications' | 'orcid' | 'organizations' | 'organizationsWithEndorsementPrivileges' | 'profileImagePath' | 'ranks' | 'role' | 'statsHash' | 'twitterHandle' | 'url' | 'username' | UserKeySpecifier)[];
25452547
export type UserFieldPolicy = {
25462548
apiKeys?: FieldPolicy<any> | FieldReadFunction<any>,
25472549
areaOfExpertise?: FieldPolicy<any> | FieldReadFunction<any>,
@@ -2552,6 +2554,7 @@ export type UserFieldPolicy = {
25522554
events?: FieldPolicy<any> | FieldReadFunction<any>,
25532555
facebookProfile?: FieldPolicy<any> | FieldReadFunction<any>,
25542556
id?: FieldPolicy<any> | FieldReadFunction<any>,
2557+
joinDate?: FieldPolicy<any> | FieldReadFunction<any>,
25552558
linkedinProfile?: FieldPolicy<any> | FieldReadFunction<any>,
25562559
mostRecentActivityTimestamp?: FieldPolicy<any> | FieldReadFunction<any>,
25572560
mostRecentConflictOfInterestStatement?: FieldPolicy<any> | FieldReadFunction<any>,

client/src/app/generated/civic.apollo.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,7 @@ export type BrowseUser = {
907907
evidenceCount: Scalars['Int']['output'];
908908
facebookProfile?: Maybe<Scalars['String']['output']>;
909909
id: Scalars['Int']['output'];
910+
joinDate?: Maybe<Scalars['ISO8601DateTime']['output']>;
910911
linkedinProfile?: Maybe<Scalars['String']['output']>;
911912
mostRecentActivityTimestamp?: Maybe<Scalars['ISO8601DateTime']['output']>;
912913
mostRecentConflictOfInterestStatement?: Maybe<Coi>;
@@ -3710,6 +3711,7 @@ export type LeaderboardUser = {
37103711
events: EventConnection;
37113712
facebookProfile?: Maybe<Scalars['String']['output']>;
37123713
id: Scalars['Int']['output'];
3714+
joinDate?: Maybe<Scalars['ISO8601DateTime']['output']>;
37133715
linkedinProfile?: Maybe<Scalars['String']['output']>;
37143716
mostRecentActivityTimestamp?: Maybe<Scalars['ISO8601DateTime']['output']>;
37153717
mostRecentConflictOfInterestStatement?: Maybe<Coi>;
@@ -7370,6 +7372,7 @@ export type User = {
73707372
events: EventConnection;
73717373
facebookProfile?: Maybe<Scalars['String']['output']>;
73727374
id: Scalars['Int']['output'];
7375+
joinDate?: Maybe<Scalars['ISO8601DateTime']['output']>;
73737376
linkedinProfile?: Maybe<Scalars['String']['output']>;
73747377
mostRecentActivityTimestamp?: Maybe<Scalars['ISO8601DateTime']['output']>;
73757378
mostRecentConflictOfInterestStatement?: Maybe<Coi>;

client/src/app/generated/server.model.graphql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,6 +1516,7 @@ type BrowseUser {
15161516
evidenceCount: Int!
15171517
facebookProfile: String
15181518
id: Int!
1519+
joinDate: ISO8601DateTime
15191520
linkedinProfile: String
15201521
mostRecentActivityTimestamp: ISO8601DateTime
15211522
mostRecentConflictOfInterestStatement: Coi
@@ -6553,6 +6554,7 @@ type LeaderboardUser {
65536554
): EventConnection!
65546555
facebookProfile: String
65556556
id: Int!
6557+
joinDate: ISO8601DateTime
65566558
linkedinProfile: String
65576559
mostRecentActivityTimestamp: ISO8601DateTime
65586560
mostRecentConflictOfInterestStatement: Coi
@@ -12473,6 +12475,7 @@ type User {
1247312475
): EventConnection!
1247412476
facebookProfile: String
1247512477
id: Int!
12478+
joinDate: ISO8601DateTime
1247612479
linkedinProfile: String
1247712480
mostRecentActivityTimestamp: ISO8601DateTime
1247812481
mostRecentConflictOfInterestStatement: Coi

client/src/app/generated/server.schema.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7232,6 +7232,18 @@
72327232
"isDeprecated": false,
72337233
"deprecationReason": null
72347234
},
7235+
{
7236+
"name": "joinDate",
7237+
"description": null,
7238+
"args": [],
7239+
"type": {
7240+
"kind": "SCALAR",
7241+
"name": "ISO8601DateTime",
7242+
"ofType": null
7243+
},
7244+
"isDeprecated": false,
7245+
"deprecationReason": null
7246+
},
72357247
{
72367248
"name": "linkedinProfile",
72377249
"description": null,
@@ -30378,6 +30390,18 @@
3037830390
"isDeprecated": false,
3037930391
"deprecationReason": null
3038030392
},
30393+
{
30394+
"name": "joinDate",
30395+
"description": null,
30396+
"args": [],
30397+
"type": {
30398+
"kind": "SCALAR",
30399+
"name": "ISO8601DateTime",
30400+
"ofType": null
30401+
},
30402+
"isDeprecated": false,
30403+
"deprecationReason": null
30404+
},
3038130405
{
3038230406
"name": "linkedinProfile",
3038330407
"description": null,
@@ -55900,6 +55924,18 @@
5590055924
"isDeprecated": false,
5590155925
"deprecationReason": null
5590255926
},
55927+
{
55928+
"name": "joinDate",
55929+
"description": null,
55930+
"args": [],
55931+
"type": {
55932+
"kind": "SCALAR",
55933+
"name": "ISO8601DateTime",
55934+
"ofType": null
55935+
},
55936+
"isDeprecated": false,
55937+
"deprecationReason": null
55938+
},
5590355939
{
5590455940
"name": "linkedinProfile",
5590555941
"description": null,

server/app/graphql/types/entities/user_type.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class UserType < Types::BaseObject
2424
field :ranks, Types::Entities::RanksType, null: false
2525
field :email, String, null: true
2626
field :api_keys, [ Types::ApiKeyType ], null: false
27+
field :join_date, GraphQL::Types::ISO8601DateTime, null: true
2728

2829
profile_image_sizes = [ 256, 128, 64, 32, 18, 12 ]
2930
field :profile_image_path, String, null: true do
@@ -140,5 +141,14 @@ def api_keys
140141
[]
141142
end
142143
end
144+
145+
def join_date
146+
# In the case of merged accounts, the created_at field on the user record
147+
# may be misleading. Instead use the first known authorization record.
148+
object.authorizations
149+
.order("created_at ASC")
150+
.pluck(:created_at)
151+
.first
152+
end
143153
end
144154
end

0 commit comments

Comments
 (0)