Add Repo Create subcomand & enhancements #173

Merged
6543 merged 20 commits from 6543/tea:repos-create into master 2020-09-23 19:50:02 +00:00
Showing only changes of commit eb0cea0522 - Show all commits

View File

@ -142,7 +142,7 @@ func runReposList(ctx *cli.Context) error {
var rps []*gitea.Repository
var err error
// ToDo: on sdk v0.13.0 release, switch to SearchRepos()
// TODO: on sdk v0.13.0 release, switch to SearchRepos()
6543 marked this conversation as resolved Outdated

TODO: is usually better detected by IDEs

`TODO:` is usually better detected by IDEs
Outdated
Review

By using initCommandLoginOnly(), the login is not read from the current repo!

This came up in #189 as well, where I wrote a workaround.
But we need a proper solution for cases where the command is meaningful when executed outside of a repo, but we still want it to consider repo context where available.

By using `initCommandLoginOnly()`, the login is not read from the current repo! This came up in #189 as well, where I wrote a workaround. But we need a proper solution for cases where the command is meaningful when executed outside of a repo, but we still want it to consider repo context where available.
Outdated
Review

If we use login, _, _ := initCommand() outside of a repo we will get this:

Error: repository does not exist

If we use `login, _, _ := initCommand()` outside of a repo we will get this: Error: repository does not exist
Outdated
Review

So yes we somehow have to unify both commands but in a way it will work for all commands

So yes we somehow have to unify both commands but in a way it will work for all commands
Outdated
Review

... witch is no mouch for this pull

... witch is no mouch for this pull
// Note: user filter can be used as org filter too
if org != "" {
rps, err = login.Client().ListOrgRepos(org, gitea.ListOrgReposOptions{})