> ...
>
> idears: `tea pr lgtm`
>
> https://github.com/go-gitea/gitea/pull/11224 bring api for reviews - use them
so you basically want to approve a pr?
@6543 Whats the difference between deny and reject?
I propose
tea pr reject <idx> <comment> # reject requires a comment
tea pr approve <idx> [<comment>] # approve may have a comment
tea pr lgtm <idx> # alias to approve
tea pr review <idx> # interactive mode asking for state & comment
@6543 Whats the difference between deny and reject?
I propose
```
tea pr reject <idx> <comment> # reject requires a comment
tea pr approve <idx> [<comment>] # approve may have a comment
tea pr lgtm <idx> # alias to approve
tea pr review <idx> # interactive mode asking for state & comment
```
An epic feature idea: Maybe we can pipe in a patch-mail and parse that into code comments? 🤔
So an input like
> diff --git a/cmd/comment.go b/cmd/comment.go
> new file mode 100644
> index 0000000..0ac7b55
> --- /dev/null
> +++ b/cmd/comment.go
> @@ -0,0 +1,56 @@
> +// Copyright 2020 The Gitea Authors. All rights reserved.
2020 is almost over my friend
> +// Use of this source code is governed by a MIT-style
> +// license that can be found in the LICENSE file.
> +
> +package cmd
> +
> +import (
> + "fmt"
> + "strings"
would translate to
c := CreatePullReviewComment {
Path: "cmd/comment.go",
Body: "2020 is almost over my friend",
NewLineNum: 1,
}
An epic feature idea: Maybe we can pipe in a [patch-mail](https://drewdevault.com/2018/07/02/Email-driven-git.html) and parse that into code comments? 🤔
So an input like
```
> diff --git a/cmd/comment.go b/cmd/comment.go
> new file mode 100644
> index 0000000..0ac7b55
> --- /dev/null
> +++ b/cmd/comment.go
> @@ -0,0 +1,56 @@
> +// Copyright 2020 The Gitea Authors. All rights reserved.
2020 is almost over my friend
> +// Use of this source code is governed by a MIT-style
> +// license that can be found in the LICENSE file.
> +
> +package cmd
> +
> +import (
> + "fmt"
> + "strings"
```
would translate to
```
c := CreatePullReviewComment {
Path: "cmd/comment.go",
Body: "2020 is almost over my friend",
NewLineNum: 1,
}
```
if called via
```
cat foo.patch.review | tea pr review 300
```
If there is a golang git patch parser, this could actually be doable
edit: https://github.com/sourcegraph/go-diff might work
@6543 Whats the difference between deny and reject?
I propose
tea pr reject <idx> <comment> # reject requires a comment
tea pr approve <idx> [<comment>] # approve may have a comment
tea pr lgtm <idx> # alias to approve
tea pr review <idx> # interactive mode asking for state & comment
missing tea pr comment <idx> <comment> but I think this is it 👍
right I think review is the way to go, since comment indicate you append a comment onto this pull - a subcomand we should add if we show comments of issues/pulls ...
> @6543 Whats the difference between deny and reject?
>
> I propose
> ```
> tea pr reject <idx> <comment> # reject requires a comment
> tea pr approve <idx> [<comment>] # approve may have a comment
> tea pr lgtm <idx> # alias to approve
> tea pr review <idx> # interactive mode asking for state & comment
> ```
~~missing `tea pr comment <idx> <comment>` but I think this is it :+1:~~
right I think review is the way to go, since comment indicate you append a comment onto this pull - a subcomand we should add if we show comments of issues/pulls ...
@6543 Whats the difference between deny and reject?
I propose
tea pr reject <idx> <comment> # reject requires a comment
tea pr approve <idx> [<comment>] # approve may have a comment
tea pr lgtm <idx> # alias to approve
tea pr review <idx> # interactive mode asking for state & comment
I like reject.
> @6543 Whats the difference between deny and reject?
>
> I propose
> ```
> tea pr reject <idx> <comment> # reject requires a comment
> tea pr approve <idx> [<comment>] # approve may have a comment
> tea pr lgtm <idx> # alias to approve
> tea pr review <idx> # interactive mode asking for state & comment
> ```
I like reject.
...
idears:
tea pr lgtm
https://github.com/go-gitea/gitea/pull/11224 bring api for reviews - use them
I'll try it
@crapStone https://gitea.com/gitea/go-sdk/src/branch/master/gitea/pull_review.go has the func you need :)
so you basically want to approve a pr?
what do you think of:
tea pr lgtm
as approve shortcut andtea pr review deny/accept/comment/reject(upcoming...) -text-
@6543 Whats the difference between deny and reject?
I propose
An epic feature idea: Maybe we can pipe in a patch-mail and parse that into code comments? 🤔
So an input like
would translate to
if called via
If there is a golang git patch parser, this could actually be doable
edit: https://github.com/sourcegraph/go-diff might work
missingtea pr comment <idx> <comment>
but I think this is it 👍right I think review is the way to go, since comment indicate you append a comment onto this pull - a subcomand we should add if we show comments of issues/pulls ...
I like reject.