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

Support Reusable Configuring #317

Open
joshmedeski opened this issue Dec 26, 2023 · 1 comment
Open

Support Reusable Configuring #317

joshmedeski opened this issue Dec 26, 2023 · 1 comment

Comments

@joshmedeski
Copy link

Is your feature request related to a problem? Please describe.
As a user, I want to reuse configuration logic across different config files, so I can reduce code duplication and better streamline my workflow.

Describe the solution you'd like
I currently have a simple script that takes local .gh-dash.yml files (if they exists) and create custom views for certain projects.

Here is an example of custom config for a specific project:

prSections:
  # ...custom sections
issuesSections:
  # ... custom sections
defaults:
  layout:
    issues:
      repo:
        hidden: true
    prs:
      repo:
        hidden: true
  preview:
    width: 80
repoPaths:
  # ... custom path
keybindings:
  prs:
    - key: O
      command: >
        tmux new-window -c {{.RepoPath}} 'nvim -c ":silent Octo pr edit {{.PrNumber}}"'

I would like to be able to extend a "base" configuration and allow gh-dash to read those configuration values

prSections:
  # ...custom sections
issuesSections:
  # ... custom sections
repoPaths:
  # ... custom path
extend:
  - ~/.config/gh-dash/base.yml

Then, if I want to adjust defaults, keybindings or anything else I can change it in one place and everywhere else will automatically get those updates.

Describe alternatives you've considered

  1. Just copy/paste the changes I want to all gh-dash files (this is difficult as they are all in different places.
  2. Create some sort of complex yq script that merges the base config with the custom config before opening gh-dash (via my ghd script)

Additional context
I may move all my gh-dash custom config files to a centralized place (like ~/.config/gh-dash/*.yml but that won't alleviate my current issue of not being able to share config values across different files.

@dlvhdr
Copy link
Owner

dlvhdr commented Dec 26, 2023

Love it

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