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
Owner

add tea repos create
add repo detail view tea repos tea/tea repos gitea/tea
impruve repo related comand descriptions

cloe #170

add `tea repos create` add repo detail view `tea repos tea`/`tea repos gitea/tea` impruve repo related comand descriptions cloe #170
6543 added 4 commits 2020-09-12 18:45:52 +00:00
6543 added the
status/needs-reviews
kind
feature
kind
enhancement
labels 2020-09-12 18:46:23 +00:00
6543 added this to the v0.5.0 milestone 2020-09-12 18:46:29 +00:00
zeripath reviewed 2020-09-14 14:02:08 +00:00
Dismissed
cmd/repos.go Outdated
@ -57,6 +142,8 @@ func runReposList(ctx *cli.Context) error {
var rps []*gitea.Repository
var err error
// ToDo: on sdk v0.13.0 release, switch to SearchRepos()
Owner

TODO: is usually better detected by IDEs

`TODO:` is usually better detected by IDEs
6543 marked this conversation as resolved
zeripath approved these changes 2020-09-14 14:06:05 +00:00
Dismissed
6543 added 1 commit 2020-09-15 02:26:38 +00:00
Merge branch 'master' into repos-create
All checks were successful
continuous-integration/drone/pr Build is passing
c796cf63db
6543 added 4 commits 2020-09-16 02:36:40 +00:00
6543 added 1 commit 2020-09-16 02:45:35 +00:00
split user org
All checks were successful
continuous-integration/drone/pr Build is passing
859d3025f2
6543 added 1 commit 2020-09-17 12:56:32 +00:00
Merge branch 'master' into repos-create
All checks were successful
continuous-integration/drone/pr Build is passing
17a4e39c06
6543 added 1 commit 2020-09-17 19:36:13 +00:00
Merge branch 'master' into repos-create
All checks were successful
continuous-integration/drone/pr Build is passing
4eb9f1cc60
6543 added 1 commit 2020-09-17 20:56:53 +00:00
rm local filter, let us fix upstream
All checks were successful
continuous-integration/drone/pr Build is passing
4bc608a890
6543 added 1 commit 2020-09-17 21:04:55 +00:00
refactor
All checks were successful
continuous-integration/drone/pr Build is passing
2d41ba2cb8
6543 force-pushed repos-create from 2d41ba2cb8 to d63a9e0ff7 2020-09-17 21:05:33 +00:00 Compare
6543 added 1 commit 2020-09-19 18:53:48 +00:00
Merge branch 'master' into repos-create
All checks were successful
continuous-integration/drone/pr Build is passing
0a4a73e49b
noerw requested changes 2020-09-23 11:19:59 +00:00
Dismissed
noerw left a comment
Member

Nice, but some remarks :)

The issue with initCommandLoginOnly() is a bug to me, but we might want to solve it across the whole codebase in a separate PR

Nice, but some remarks :) The issue with `initCommandLoginOnly()` is a bug to me, but we might want to solve it across the whole codebase in a separate PR
cmd/repos.go Outdated
@ -16,3 +19,3 @@
var CmdRepos = cli.Command{
Name: "repos",
Usage: "Operate with repositories",
Usage: "show repositories details",
Member

"Show repository details"
Please change Description field as well

"Show repository details" Please change `Description` field as well
cmd/repos.go Outdated
@ -37,0 +44,4 @@
},
&cli.StringFlag{
Name: "user",
Aliases: []string{"u"},
Member

lets use owner / -O everywhere, and avoid two terms for the same concept

lets use `owner` / `-O` everywhere, and avoid two terms for the same concept
Member

And why are there two flags org and user? Can't they be merged into --owner?

And why are there two flags `org` and `user`? Can't they be merged into `--owner`?
Author
Owner

It will add a request ...
but It's user convinient So why not ...

It will add a request ... but It's user convinient So why not ...
Member

Hm, I consider two flags for the same field is more confusing than convenient, but idk.

Let's leave it as is, but please change the description to say "Filter by user" then

Hm, I consider two flags for the same field is more confusing than convenient, but idk. Let's leave it as is, but please change the description to say "Filter by user" then
Author
Owner

changed :)

changed :)
cmd/repos.go Outdated
@ -49,3 +142,4 @@
// runReposList list repositories
func runReposList(ctx *cli.Context) error {
login := initCommandLoginOnly()
Member

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.
Author
Owner

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
Author
Owner

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
Author
Owner

... witch is no mouch for this pull

... witch is no mouch for this pull
6543 removed the
status/needs-reviews
label 2020-09-23 14:24:20 +00:00
6543 added 1 commit 2020-09-23 19:12:59 +00:00
Merge branch 'master' into repos-create
All checks were successful
continuous-integration/drone/pr Build is passing
824386d0bb
6543 added 2 commits 2020-09-23 19:33:12 +00:00
repos ls: use owner filter and remove org&user one
All checks were successful
continuous-integration/drone/pr Build is passing
7873abe197
Author
Owner

@noerw done

@noerw done
noerw approved these changes 2020-09-23 19:43:47 +00:00
Dismissed
6543 merged commit 2e701ee8a2 into master 2020-09-23 19:50:01 +00:00
6543 deleted branch repos-create 2020-09-23 19:50:12 +00:00
Sign in to join this conversation.
No description provided.