Commit dca1183
authored
🪲 [Fix]: Load existing config when starting a new session (#211)
## Description
This pull request includes changes to the initialization process of the
GitHub configuration. The main goal is to improve the handling of the
GitHub configuration by ensuring it is properly initialized and loaded
from defaults or context when necessary.
* Fixes #210
Improvements to GitHub configuration initialization:
*
[`src/functions/private/Config/Initialize-GitHubConfig.ps1`](diffhunk://#diff-0bd6f61981cdae153b550552b394da11c794e8ad8ae819fbb7bb702022a02e5dL32-L50):
Refactored the process block to better handle forced initialization and
loading of the GitHub configuration from context or defaults. Added
checks to avoid reinitializing if the configuration is already in
memory.
Changes to default configuration handling:
*
[`src/variables/private/Config.ps1`](diffhunk://#diff-24f682ffe9ba06c3a7c6620f5c550ddc9eac8bdfb1aefe07961c41cf1a5e9552L18-R18):
Set the initial value of `Config` to `$null` instead of creating a new
`GitHubConfig` instance. This ensures that the configuration is loaded
properly during initialization.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [x] 🪲 [Fix]
- [ ] 🩹 [Patch]
- [ ] 1 parent 75040b9 commit dca1183
File tree
2 files changed
+26
-16
lines changed- src
- functions/private/Config
- variables/private
2 files changed
+26
-16
lines changedLines changed: 25 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 52 | + | |
47 | 53 | | |
48 | | - | |
49 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
0 commit comments