Add Repo Create subcomand & enhancements #173

Merged
6543 merged 20 commits from 6543/tea:repos-create into master 2 years ago
6543 commented 2 years ago
Collaborator

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 2 years ago
6543 added the
status/needs-reviews
kind/feature
kind/enhancement
labels 2 years ago
6543 added this to the v0.5.0 milestone 2 years ago
zeripath reviewed 2 years ago
Dismissed
cmd/repos.go Outdated
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 2 years ago
Dismissed
6543 added 1 commit 2 years ago
c796cf63db
Merge branch 'master' into repos-create
6543 added 4 commits 2 years ago
6543 added 1 commit 2 years ago
859d3025f2
split user org
6543 added 1 commit 2 years ago
17a4e39c06 Merge branch 'master' into repos-create
6543 added 1 commit 2 years ago
4eb9f1cc60 Merge branch 'master' into repos-create
6543 added 1 commit 2 years ago
4bc608a890
rm local filter, let us fix upstream
6543 added 1 commit 2 years ago
2d41ba2cb8
refactor
6543 force-pushed repos-create from 2d41ba2cb8 to d63a9e0ff7 2 years ago
6543 added 1 commit 2 years ago
0a4a73e49b Merge branch 'master' into repos-create
noerw requested changes 2 years ago
Dismissed
noerw left a comment
Collaborator

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
var CmdRepos = cli.Command{
Name: "repos",
Usage: "Operate with repositories",
Usage: "show repositories details",
noerw commented 2 years ago
Collaborator

"Show repository details"
Please change Description field as well

"Show repository details" Please change `Description` field as well
cmd/repos.go Outdated
},
&cli.StringFlag{
Name: "user",
Aliases: []string{"u"},
noerw commented 2 years ago
Collaborator

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
noerw commented 2 years ago
Collaborator

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`?
6543 commented 2 years ago
Poster
Collaborator

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 ...
noerw commented 2 years ago
Collaborator

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
6543 commented 2 years ago
Poster
Collaborator

changed :)

changed :)
cmd/repos.go Outdated
// runReposList list repositories
func runReposList(ctx *cli.Context) error {
login := initCommandLoginOnly()
noerw commented 2 years ago
Collaborator

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.
6543 commented 2 years ago
Poster
Collaborator

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
6543 commented 2 years ago
Poster
Collaborator

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
6543 commented 2 years ago
Poster
Collaborator

... witch is no mouch for this pull

... witch is no mouch for this pull
6543 removed the
status/needs-reviews
label 2 years ago
6543 added 1 commit 2 years ago
824386d0bb Merge branch 'master' into repos-create
6543 added 2 commits 2 years ago
Poster
Collaborator

@noerw done

@noerw done
noerw approved these changes 2 years ago
Dismissed
6543 merged commit 2e701ee8a2 into master 2 years ago
6543 deleted branch repos-create 2 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 2e701ee8a2.
Sign in to join this conversation.
Loading…
There is no content yet.