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:
Muhsin Keloth
2025-02-28 14:20:27 +05:30
committed by GitHub
parent e90c231dd3
commit ef24eef0b9
8 changed files with 33 additions and 8 deletions

View File

@@ -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',

View File

@@ -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