octotui
octotui copied to clipboard
Add config option for default GitHub user/organization
This adds a config value in a file called default_owner
. The config value is in the format name:type
, where name
is the user or organization, and type
is either user
or org
. octotui
will attempt to read from this config file if the search
subcommand is not used. If the config value is not set, then the user is instructed to either fill in this config value or use the search
subcommand.
Some other changes this PR makes:
- Refactors code so that most of the logic from
LoadToken
is moved into a more generic functionloadConfigFile
- Fixes bug where
octotui
would fail early if the config folder exists, but not the config file - Made
renderUser
andrenderOrganization
public functions
Resolves #5
hit me up in Discord: lya Revenko#4742
Cleaning up old PRs and forks. Will probably delete the fork soon, but the refs in this PR should still be reachable via refs/pull/NUMBER/head
.