Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration file #37

Open
MiSikora opened this issue Sep 28, 2020 · 2 comments
Open

Add configuration file #37

MiSikora opened this issue Sep 28, 2020 · 2 comments
Assignees

Comments

@MiSikora
Copy link
Collaborator

MiSikora commented Sep 28, 2020

Configuration handling needs some love. We should standardize it so it can be easily editable and extensible. One of the propositions we discussed was to use a YAML file.

version: 1
selectedAccount: default
accounts:
  default:
    jiraName: somename
    accountId: 123
    token: 345
    config:
      settings:
        someFlag: true
        defaultRemainingEstimate: 1h
      aliases:
        sm: abc-123
        daily: abc-123
        lunch: abc-321
      attributes:
        _EXTERNALREF_: foo
        _COLOR_: green
  jake:
    jiraName: somename
    accountId: 123
    token: 345
    config:
      settings:
        defaultRemainingEstimate: 1h
      aliases: []
      attributes:
        _EXTERNALREF_: foo
        _COLOR_: green
config:
  settings:
    defaultRemainingEstimate: 0h
  aliases:
    sm: abc-123
    daily: abc-123
    lunch: abc-321
  attributes:
    _EXTERNALREF_: foo
    _COLOR_: green

While it would serve its purpose I'm not the biggest fan of the YAML format. I'd like us to consider TOML or HOCON which in my opinion have better syntaxes.

@szymonkozak
Copy link
Owner

szymonkozak commented Sep 29, 2020

I modified some keys and structure and my proposition is something like that:

version: 2
selectedAccount: default
accounts:
  default:
    accountId: 123
    token: 345
    accountConfig:
      settings:
        someFlag: true
        defaultRemainingEstimate: 1h
      aliases:
        sm: abc-123
        daily: abc-123
        lunch: abc-321
      attributes:
        _EXTERNALREF_: foo
        _COLOR_: green
  jake:
    accountId: 123
    token: 345
    accountConfig:
      settings:
        defaultRemainingEstimate: 1h
      aliases: []
      attributes:
        _EXTERNALREF_: foo
        _COLOR_: green
globalConfig:
  settings:
    defaultRemainingEstimate: 0h
  aliases:
    sm: abc-123
    daily: abc-123
    lunch: abc-321
  attributes:
    _EXTERNALREF_: foo
    _COLOR_: green

@szymonkozak
Copy link
Owner

Also I started writing migration from old config file but for now I have some problems with parsing maps (for example aliases) to YAML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants