Add --fields
to notification & milestone listings #422
16
.drone.yml
16
.drone.yml
|
@ -9,7 +9,7 @@ platform:
|
|||
steps:
|
||||
- name: build
|
||||
pull: always
|
||||
image: golang:1.16
|
||||
image: golang:1.17
|
||||
environment:
|
||||
GOPROXY: https://goproxy.cn
|
||||
commands:
|
||||
|
@ -27,7 +27,7 @@ steps:
|
|||
- pull_request
|
||||
|
||||
- name: unit-test
|
||||
image: golang:1.16
|
||||
image: golang:1.17
|
||||
commands:
|
||||
- make unit-test-coverage
|
||||
settings:
|
||||
|
@ -40,7 +40,7 @@ steps:
|
|||
- pull_request
|
||||
|
||||
- name: release-test
|
||||
image: golang:1.16
|
||||
image: golang:1.17
|
||||
commands:
|
||||
- make test
|
||||
settings:
|
||||
|
@ -54,7 +54,7 @@ steps:
|
|||
|
||||
- name: tag-test
|
||||
pull: always
|
||||
image: golang:1.16
|
||||
image: golang:1.17
|
||||
commands:
|
||||
- make test
|
||||
settings:
|
||||
|
@ -64,7 +64,7 @@ steps:
|
|||
- tag
|
||||
|
||||
- name: static
|
||||
image: golang:1.16
|
||||
image: golang:1.17
|
||||
environment:
|
||||
GOPROXY: https://goproxy.cn
|
||||
commands:
|
||||
|
@ -120,8 +120,7 @@ steps:
|
|||
settings:
|
||||
acl: public-read
|
||||
bucket: gitea-artifacts
|
||||
endpoint: https://storage.gitea.io
|
||||
path_style: true
|
||||
endpoint: https://ams3.digitaloceanspaces.com
|
||||
source: "dist/release/*"
|
||||
strip_prefix: dist/release/
|
||||
target: "/tea/${DRONE_BRANCH##release/v}"
|
||||
|
@ -142,8 +141,7 @@ steps:
|
|||
settings:
|
||||
acl: public-read
|
||||
bucket: gitea-artifacts
|
||||
endpoint: https://storage.gitea.io
|
||||
path_style: true
|
||||
endpoint: https://ams3.digitaloceanspaces.com
|
||||
source: "dist/release/*"
|
||||
strip_prefix: dist/release/
|
||||
target: /tea/master
|
||||
|
|
|
@ -10,7 +10,7 @@ labels:
|
|||
- tea version used (`tea -v`):
|
||||
- [ ] I also reproduced the issue [with the latest master build](https://dl.gitea.io/tea/master)
|
||||
- Gitea version used:
|
||||
- [ ] the issue only occured after updating gitea recently
|
||||
- [ ] the issue only occurred after updating gitea recently
|
||||
- operating system:
|
||||
- I make use of...
|
||||
- [ ] non-standard default branch names (no `main`,`master`, or `trunk`)
|
||||
|
|
|
@ -57,8 +57,8 @@ high-level discussions.
|
|||
|
||||
## Testing redux
|
||||
|
||||
Before sending code out for review, run all the test by execting: `make test`
|
||||
Since TEA is an cli tool it should be obvious to test your feature localy first.
|
||||
Before sending code out for review, run all the test by executing: `make test`
|
||||
Since TEA is an cli tool it should be obvious to test your feature locally first.
|
||||
|
||||
## Vendoring
|
||||
|
||||
|
@ -77,7 +77,7 @@ You can find more information on how to get started with it on the [dep project
|
|||
## Code review
|
||||
|
||||
Changes to TEA must be reviewed before they are accepted—no matter who
|
||||
makes the change, even if they are an owner or a maintainer. We use Giteas's
|
||||
makes the change, even if they are an owner or a maintainer. We use Gitea's
|
||||
pull request & review workflow to do that. Gitea ensure every PR is reviewed by at least 2 maintainers.
|
||||
|
||||
Please try to make your pull request easy to review for us. And, please read
|
||||
|
@ -118,8 +118,8 @@ Some of the key points:
|
|||
- Always make sure that the help texts are properly set, and as concise as possible.
|
||||
|
||||
### Internal Module Structure
|
||||
- `cmd`: only contains comand/flag options for `urfave/cli`
|
||||
- subcomands are in a subpackage named after its parent comand
|
||||
- `cmd`: only contains command/flag options for `urfave/cli`
|
||||
- subcommands are in a subpackage named after its parent command
|
||||
- `modules/task`: contain func for doing something with gitea
|
||||
(e.g. create token by user/passwd)
|
||||
- `modules/print`: contain all functions that print to stdout
|
||||
|
|
3
build.go
3
build.go
|
@ -1,7 +1,8 @@
|
|||
// Copyright 2020 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
//+build vendor
|
||||
//go:build vendor
|
||||
// +build vendor
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ func runMilestonesCreate(cmd *cli.Context) error {
|
|||
deadline := &time.Time{}
|
||||
if date != "" {
|
||||
t, err := dateparse.ParseAny(date)
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
deadline = &t
|
||||
|
|
|
@ -164,6 +164,11 @@ func contextFromLocalRepo(repoPath, remoteValue string) (*git.TeaRepo, *config.L
|
|||
remoteValue = remote
|
||||
}
|
||||
if len(gitConfig.Remotes) > 1 {
|
||||
// prefer origin if there is multiple remotes
|
||||
_, ok := gitConfig.Remotes["origin"]
|
||||
if ok {
|
||||
remoteValue = "origin"
|
||||
}
|
||||
// if master branch is present, use it as the default remote
|
||||
mainBranches := []string{"main", "master", "trunk"}
|
||||
for _, b := range mainBranches {
|
||||
|
|
|
@ -140,7 +140,7 @@ func outputyaml(headers []string, values [][]string) {
|
|||
|
||||
func isMachineReadable(outputFormat string) bool {
|
||||
switch outputFormat {
|
||||
case "yml", "yaml", "csv":
|
||||
case "yml", "yaml", "csv", "tsv":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue
Block a user