go-gitea / tea Goto Github PK
View Code? Open in Web Editor NEWA command line tool to interact with Gitea servers, moved to https://gitea.com/gitea/tea
License: MIT License
A command line tool to interact with Gitea servers, moved to https://gitea.com/gitea/tea
License: MIT License
I cant download the package as suggested (go get github.com/go-gitea/tea
), it fails with the following error message:
can't load package: package github.com/go-gitea/tea: code in directory /home/norwin/src/github.com/go-gitea/tea expects import "code.gitea.io/tea"
Doing go get code.gitea.io/tea
works, but this package seems to not represent the current version from github.
do you plan to add ability to create pull request via tea?
Whilst I nearly had tea working before, I've rebuilt my laptop, reinstalled golang and followed the readme. However when I run
go install code.gitea.io/tea
I get:
can't load package: package code.gitea.io/tea: cannot find package "code.gitea.io/tea" in any of:
C:\Go\src\code.gitea.io\tea (from $GOROOT)
C:\Users\(me)\go\src\code.gitea.io\tea (from $GOPATH)
Certain other repository management tools, such as Gitolite, allow a user to see what repositories they have access to by passing info to the SSH command.
For example, ssh [email protected] info
The result is a list of repositories.
This is really useful not only for command-line users but also for quickly verifying what access someone has.
Could Gitea support this?
(Moved from go-gitea/gitea#5124)
running:
go get github.com/go-gitea/tea
Gives:
package github.com/go-gitea/tea: code in directory C:\Users\<me>\go\src\github.com\go-gitea\tea expects import "code.gitea.io/tea"
The readme doesn't mention how that should get resolved.
I tried:
go get code.gitea.io/tea
This silently returned, but subsequently running the following failed with the same error above:
go install github.com/go-gitea/tea
Can you add a built release of this tool?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x14ece93]
goroutine 1 [running]:
code.gitea.io/tea/cmd.runPulls(0xc000106f20, 0xc0001e2000, 0xc000106f20)
/Users/quanta/go/src/code.gitea.io/tea/cmd/pulls.go:52 +0x363
github.com/urfave/cli.HandleAction(0x155c680, 0x163e5f8, 0xc000106f20, 0x0, 0xc000086ba0)
/Users/quanta/go/src/github.com/urfave/cli/app.go:502 +0xbe
github.com/urfave/cli.Command.Run(0x161dc87, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x162e67d, 0x24, 0x0, ...)
/Users/quanta/go/src/github.com/urfave/cli/command.go:165 +0x420
github.com/urfave/cli.(*App).Run(0xc0001c2380, 0xc0000b6000, 0x4, 0x4, 0x0, 0x0)
/Users/quanta/go/src/github.com/urfave/cli/app.go:259 +0x6cf
main.main()
/Users/quanta/go/src/code.gitea.io/tea/main.go:43 +0x264
The reason is: go-gitea/go-sdk#161
I'm probably doing something stupid but I've successfully done a tea login and was then attempting to create a release with:
tea releases create --title "0.0.1-alpha" --target master --draft --asset myapp.zip
But how do I specify the repo? There is no -r/--repo flag on this command and the preceding login command didn't allow me to specify a repo at the end of the url.
I understandably get the error:
You have to indicate a repo or execute the command in a repo
I'm not sure what "in a repo" means - I'm in the git folder containing my app. Eventually I'll want to do this from the CI.
Any examples of creating a release much appreciated.
FWIW Doing a tea -v gives Tea version 0.1.0-dev
as of #5
go get github.com/go-gitea/tea
package github.com/go-gitea/tea: code in directory /home/vtolstov/.cache/go-path/src/github.com/go-gitea/tea expects import "code.gitea.io/tea"
go get code.gitea.io/tea
package code.gitea.io/sdk/gitea: unrecognized import path "code.gitea.io/sdk/gitea" (parse https://code.gitea.io/sdk/gitea?go-get=1: no go-import meta tags ())
Hi,
currently every function printing information handles the output format on its own.
That the format cannot be changed easily e.g. in case '\t' is not available (see discussion in #13) and is not unified.
IMHO a central function for handling output in different formats (e.g. table, JSON) would improve the output of all functions to look unified.
The central output functions could handle the delimiter.
A first idea is to add function to pring table based output which gets a dictionary like this:
header:
- col1
- col2
- col3
values:
-
- c1val1
- c2val1
- c3val1
-
- c1val2
- c2val2
- c3val2
With this information the table output function can generate a header and print the values.
As all values to be printed are known at this stage the output can even be vertically aligned.
Regards,
Andreas
I'm happy to provide a pull request implementing this functionality, but want to find consensus on the command line interface first.
I'd prefer a command like this:
tea releases create --tag v1.0 --target master -t v1.0 --asset artifact1.zip --asset artifact2
But I saw that in the HTTP API assets are handled in a separate endpoint. Would the API described above be fine anyway?
If we can implement a sub command migrate
, that will be helpful.
# migrate from a http URL
tea --login=try migrate https://github.com/go-gitea/tea.git --name=gitea/tea
# migrate from local disk
tea --login=try migrate ./tea.git --name=gitea/tea
# migrate from a SSH URL, clone from ssh and then upload from local disk
tea --login=try migrate [email protected]:go-gitea/tea.git --name=gitea/tea
While trying to solve #12 with PR #15 several options were discussed.
To move the discussion out of the PR and summarize the available options I create this issue.
The short summary of the problem #12 pointed out is that the current CLI lib does not inherit global flags into several subcommands (see urfave/cli#585)
The currently available options are:
To compare both options I created a branch in my fork for each of them:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.