File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ class Authorization < Endpoint
134
134
def update_first_login ( user )
135
135
unless user . first_logged_in_at
136
136
user . update_attributes ( first_logged_in_at : Time . now )
137
- user . create_initial_subscription unless Travis . config . org?
138
137
end
139
138
end
140
139
@@ -179,6 +178,7 @@ def handshake
179
178
token = generate_token ( user : user , app_id : 0 )
180
179
payload = params [ :state ] . split ( ":::" , 2 ) [ 1 ]
181
180
update_first_login ( user )
181
+ user . create_initial_subscription
182
182
yield serialize_user ( user ) , token , payload
183
183
else
184
184
values [ :state ] = create_state
@@ -213,6 +213,7 @@ def vcs_handshake
213
213
214
214
user = User . find ( vcs_data [ 'user' ] [ 'id' ] )
215
215
update_first_login ( user )
216
+ user . create_initial_subscription
216
217
yield serialize_user ( user ) , vcs_data [ 'token' ] , payload ( params [ :provider ] )
217
218
else
218
219
state = vcs_create_state ( params [ :origin ] || params [ :redirect_uri ] )
Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ def github?
84
84
end
85
85
86
86
def create_initial_subscription
87
+ return if Travis . config . org?
88
+
87
89
client = BillingClient . new ( id )
88
90
client . create_initial_v2_subscription
89
91
end
Original file line number Diff line number Diff line change @@ -171,6 +171,8 @@ def github?
171
171
end
172
172
173
173
def create_initial_subscription
174
+ return if Travis . config . org?
175
+
174
176
client = Travis ::API ::V3 ::BillingClient . new ( id )
175
177
client . create_initial_v2_subscription
176
178
end
You can’t perform that action at this time.
0 commit comments