Enhance Admin User Listing (#427) #471

Merged
techknowlogick merged 23 commits from noerw/tea:admin-list-users into admin-list-users 2022-03-17 02:09:41 +00:00

23 Commits

Author SHA1 Message Date
1113f19aa0 add printable fields
All checks were successful
continuous-integration/drone/pr Build is passing
2022-03-16 22:10:38 +01:00
f6dc69441f improve help strings 2022-03-16 22:10:24 +01:00
632de327b0 simplify file structure 2022-03-16 22:10:17 +01:00
70c976fa1c adress my own review 2022-03-16 21:52:33 +01:00
bd827aa18c Merge branch 'master' into admin-list-users 2022-03-16 21:30:33 +01:00
Norwin
d8f4273ed0 Add TSV to machine-readable formats (#467)
All checks were successful
continuous-integration/drone/push Build is passing
...so no ansi formatting (colors) is emitted in that format (eg `tea labels -o tsv`)

Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: #467
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2022-03-13 12:00:21 +08:00
Norwin
637e3f0666 Fix CI: run make fmt (#469)
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #469
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2022-03-13 08:53:18 +08:00
techknowlogick
ced24ccabb update to new s3 location (#468)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #468
2022-03-11 05:01:29 +08:00
arkamar
fb3e1f75e9 Prefer origin if there are multiple remotes (#458)
Some checks failed
continuous-integration/drone/push Build is failing
Usually, `origin` is the name of a default remote, which corresponds with upstream. This change improves remote selection when non of `main`, `master` nor `trunk` local branches is present.

Co-authored-by: Petr Vaněk <arkamar@atlas.cz>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: #458
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: arkamar <arkamar@noreply.gitea.io>
Co-committed-by: arkamar <arkamar@noreply.gitea.io>
2022-03-09 09:35:51 +08:00
0e24009fe9 Fix create milestone with deadline bug (#462)
Some checks failed
continuous-integration/drone/push Build is failing
Fix #461

Reviewed-on: #462
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-09 08:47:58 +08:00
arkamar
cd24fd8e28 Fix few typos in contribution guidelines (#459)
Some checks failed
continuous-integration/drone/push Build is failing
I found few typos in `CONTRIBUTING.md` file.

Co-authored-by: Petr Vaněk <arkamar@atlas.cz>
Reviewed-on: #459
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: arkamar <arkamar@noreply.gitea.io>
Co-committed-by: arkamar <arkamar@noreply.gitea.io>
2022-02-22 22:34:58 +08:00
Ikko Ashimine
dd300c1269 Fix typo in bug.md (#460)
Some checks failed
continuous-integration/drone/push Build is failing
occured -> occurred

Reviewed-on: #460
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Ikko Ashimine <eltociear@noreply.gitea.io>
Co-committed-by: Ikko Ashimine <eltociear@noreply.gitea.io>
2022-02-20 00:30:58 +08:00
kellya
44c9e7e664 Correct spelling of "wether" to "whether" in usage output (#453)
Some checks failed
continuous-integration/drone/push Build is failing
Noticed "whether" misspelled as "wether" in the output of `tea issues --help` and corrected it in a few locations.

Co-authored-by: Alex Kelly <kellya@arachnitech.com>
Reviewed-on: #453
Reviewed-by: Norwin <noerw@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: kellya <kellya@noreply.gitea.io>
Co-committed-by: kellya <kellya@noreply.gitea.io>
2022-02-01 07:11:37 +08:00
Norwin
268aa06179 Add bug report issue template (#448)
All checks were successful
continuous-integration/drone/push Build is passing
As we repeatedly ask for information about users' environments, I added this template

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #448
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-12-04 11:20:36 +08:00
Norwin
a7d83ee416 Simplify build & update installation instructions (#437)
All checks were successful
continuous-integration/drone/push Build is passing
- "revert" the work done in #349. It turns out that this elaborate workaround to get statically built PIEs was only needed due to a bug in go, which got fixed in go 1.16.
- Add an exception to the `-buildmode=pie` flag for OpenBSD, as discovered in #436
- Simplify & update README installation instructions (the Arch AUR package got deleted as it wasn't maintained, so we link to `gitea-tea-git` now.)

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #437
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-12-03 04:01:10 +08:00
Norwin
a89f51f9ec Implement more issue filters (#400)
All checks were successful
continuous-integration/drone/push Build is passing
This adds new filters to `tea issues ls` and `tea pr ls`, made available in SDK 0.15:

```
--state value                 Filter by state (all|open|closed) (default: open)
--keyword value, -k value     Filter by search string
--labels value, -L value      Comma-separated list of labels to match issues against.
--milestones value, -m value  Comma-separated list of milestones to match issues against.
--author value, -A value
--assignee value, -a value
--mentions value, -M value
--from value, -F value        Filter by activity after this date
--until value, -u value       Filter by activity before this date
```

Note: I felt free to change parameter names as exposed by SDK & API, as the names exposed by them are partially bollocks (eg `mentioned_by`) and or inconsistent with usage in other commands (eg `tea times --until`)

fixes #376, related #323

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #400
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-12-03 03:26:48 +08:00
Norwin
d2295828d0 Fix resolving of URLs in markdown (#401)
All checks were successful
continuous-integration/drone/push Build is passing
Path-only URLs need an absolute reference to be resolved against for printing in markdown
Previously we resolved against the URL to the resource we were operating on (eg comment or issue URL).
The markdown renderer in the web UI resolves all such URLs relative to the repo base URL. This PR adopts this behaviour in tea, by trimming the URL to a repo base URL via regex.

This makes a custom patch to our markdown renderer `glamour` obsolete, which turned out to be an incorrect patch, meaning we can make use of upstream glamour again.

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #401
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-12-03 02:59:02 +08:00
Norwin
dc16643e0d Improve Documentation (#433)
All checks were successful
continuous-integration/drone/push Build is passing
- document more assumptions about usage context of gitea
- improve some flag descriptions (#432, #377)

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #433
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-12-03 02:33:56 +08:00
Norwin
ac25e89ebf Add tea repo create-from-template (#408)
All checks were successful
continuous-integration/drone/push Build is passing
I went with a new subcommand instead of `tea repo create --template`, as the options are quite different (bool instead of values, partially different set)

fixes #362

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #408
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-20 09:31:35 +08:00
Norwin
819cc1ab21 Add tea clone (#411)
All checks were successful
continuous-integration/drone/push Build is passing
Adds a new subcommand to clone repos:
```
tea clone --login try --depth 1 norwin/test
tea clone gitea/tea
tea clone noerw/tea           # will set up `master` to track `upstream` remote
tea clone try.gitea.io/noerw/test # will automatically set --login
```

This is just a replacement for `git clone` with small benefits:
- [x] does not depend on `git`, as tea ships with go-git
- [x] spares you typing of URLs and autoselects https/ssh based on your login config
- [x] forked repos: set up origin + upstream remote

Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: #411
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-18 20:09:27 +08:00
Norwin
78a95f1ca4 Allow editing multiline prompts with external text editor (#429)
All checks were successful
continuous-integration/drone/push Build is passing
- Adds a new `Preferences` struct to the config, initially only containing `Editor: bool (default false)`.
  This struct will be serialized to configs once there is a first tea induced change to the config (eg `tea login default <name>` or `tea login add`).
- Use external editor for all multiline prompts if preferred.

We already had a function for starting a texteditor for diff reviews; it does not really make sense to replace it with `survey.Editor`, as there is a big interface mismatch: survey expects strings as inputs, while our diff functions operate on files,

fixes #424

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #429
Reviewed-by: Andrew Thornton <art27@cantab.net>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-14 22:36:08 +08:00
Norwin
5b77345b03 Add tea repo fork (#410)
All checks were successful
continuous-integration/drone/push Build is passing
Adds a new subcommand to fork repos.

To specify the repo to fork, use the `--repo` flag. This feels a bit weird, other tea commands would put this as the first argument.
I decided to follow the flag style, as this is what all other subcommands of `tea repo` do. We might want to reconsider and make the primary subject of such commands an argument, instead of an required flag.. see #430

Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: #410
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-14 15:27:39 +08:00
Norwin
23ce7b351d fix CI release upload: switch to woodpecker/plugin-s3 (#428)
All checks were successful
continuous-integration/drone/push Build is passing
- this fixes the CI release upload issues, as the docker image for this is freshly built (unlike the mostly unmaintained "official" drone plugins), thus containing current CA certs needed for letsencrypt since 2021-09-31.
- woodpecker is a drone-ci fork maintained partially by @6543. it's API compatible with current drone plugins afaik

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: #428
Reviewed-by: Alexey 〒erentyev <axifive@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
2021-10-10 20:48:51 +08:00