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 config option for default GitHub user/organization #7

Closed
wants to merge 12 commits into from
Closed

Add config option for default GitHub user/organization #7

wants to merge 12 commits into from

Conversation

spenserblack
Copy link
Contributor

@spenserblack spenserblack commented Apr 20, 2021

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 function loadConfigFile
  • Fixes bug where octotui would fail early if the config folder exists, but not the config file
  • Made renderUser and renderOrganization public functions

Resolves #5

@irevenko
Copy link
Owner

hit me up in Discord: lya Revenko#4742

@spenserblack
Copy link
Contributor Author

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.

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

Successfully merging this pull request may close these issues.

[FEATURE] Default user config option
2 participants