feat: move Linear config to installation_config (#10999)
This PR has the following changes - Add `LINEAR_CLIENT_ID` and `LINEAR_CLIENT_SECRET` to installation config - Add Linear config to super_admin/features.yml - Replace usage of ENV.fetch with GlobalConfigService.load for fetch Client Id and Secret.
This commit is contained in:
@@ -16,9 +16,12 @@ class Linear::CallbacksController < ApplicationController
|
||||
private
|
||||
|
||||
def oauth_client
|
||||
app_id = GlobalConfigService.load('LINEAR_CLIENT_ID', nil)
|
||||
app_secret = GlobalConfigService.load('LINEAR_CLIENT_SECRET', nil)
|
||||
|
||||
OAuth2::Client.new(
|
||||
ENV.fetch('LINEAR_CLIENT_ID', nil),
|
||||
ENV.fetch('LINEAR_CLIENT_SECRET', nil),
|
||||
app_id,
|
||||
app_secret,
|
||||
{
|
||||
site: 'https://api.linear.app',
|
||||
token_url: '/oauth/token',
|
||||
|
||||
@@ -39,6 +39,8 @@ class SuperAdmin::AppConfigsController < SuperAdmin::ApplicationController
|
||||
%w[AZURE_APP_ID AZURE_APP_SECRET]
|
||||
when 'email'
|
||||
['MAILER_INBOUND_EMAIL_DOMAIN']
|
||||
when 'linear'
|
||||
%w[LINEAR_CLIENT_ID LINEAR_CLIENT_SECRET]
|
||||
else
|
||||
%w[ENABLE_ACCOUNT_SIGNUP FIREBASE_PROJECT_ID FIREBASE_CREDENTIALS]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user