JetBrains: Move auth settings from project to application level config
Created by: vdavid
Context: Currently, we store our auth-related config with the project. Why: It was probably a quick decision years ago. Then we just never changed this.
Problem: For the user, it's inconvenient to set the auth settings for each project.
Solution:
Store them on the application level.
Settings that this change should affect:
- Sourcegraph URL
- Access token
- Default branch name
- Remote URL replacements
- isGlobbingEnabled
Settings that this change should not affect:
- lastSearchQuery
- lastSearchCaseSensitive
- lastSearchPatternType
- lastSearchContextSpec
We have existing users for the old version of the plugin, so migration is a question.
Luckily, we access all settings through ConfigUtil
, and a bit through SettingsConfigurable
. We need to do is this:
- Add the five settings this change affects to the app-level config, then try accessing it at both places in ConfigUtil. SettingsConfigurable can access the values through
ConfigUtil
as well for reading, and write the values to the app-level config.
How to let them overwrite application settings on a project level in the future?