Comments (2)
@tjgurwara99 Thanks for the feature request. This type of feature has come up a couple times in the cli/cli
repo, mainly around being able to support multiple accounts GitHub accounts and switching them based on the current local repository. I think gh
itself should be vary wary of creating its own per repository config files as that greatly complicates the reading and writing of gh
configurations, but if an extension wants to create its own configuration files I think we can support that.
Right now the limiting factor for this feature is the hardcoded locations for reading and writing configuration files using the generalConfigFile()
and hostsConfigFile()
functions as you mentioned. I think if we introduced two new functions to the config
package ReadFromPath(path string) (*Config, error)
and WriteToPath(path string, c *Config) error
that would allow extensions to read/write/manipulate yaml files and it would be on the extensions to manage their own configuration files as they see fit.
Note that the config
package only has infrastructure for working with yaml files so I don't think we will want to support any other formats.
What do you think of this approach?
from go-gh.
I think if we introduced two new functions to the config package ReadFromPath(path string) (*Config, error) and WriteToPath(path string, c *Config) error that would allow extensions to read/write/manipulate yaml files and it would be on the extensions to manage their own configuration files as they see fit.
This sounds good to me. I think its a good approach as this would provide the extension owner the freedom to set their configuration however they see fit.
from go-gh.
Related Issues (20)
- Add pagination examples
- jsonpretty should not add new lines if not indenting
- TokenForHost "authentication token not found" message could be more informative HOT 3
- Feature Request: Add support to call the `gh` command interactively HOT 3
- RestClient no longer returns an HTTPError HOT 2
- Expose `ghLookupPath` or a better way to run `gh` HOT 3
- Issue while using from remote connection HOT 6
- `asciisanitizer.Sanitizer` mishandled the `�` unicode character HOT 1
- Create CODEOWNERS file ensuring the cli/code-reviewers are assigned to PRs
- CVE Vulnerability CVE-2023-3978 in dependency HOT 1
- hyperlink truncated at end of row isn't closed correctly HOT 2
- Use retryable HTTP client (for 50x) errors
- Allow default host to be determined based on configuration preference HOT 5
- Rest client support for endpoint not returning a JSON HOT 3
- AlecAivazis/survey is archived HOT 3
- Support passing httptest URLs in api.ClientOptions HOT 1
- Support for stdin and stderr in term package
- GQLCLient should return GQLError for query and mutation methods
- Add a GraphQL Mutation with an `input` object to examples HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-gh.