tea comands for reviews #131

Closed
opened 2020-04-30 22:37:14 +00:00 by 6543 · 8 comments
Owner

...

idears: tea pr lgtm

https://github.com/go-gitea/gitea/pull/11224 bring api for reviews - use them

... idears: `tea pr lgtm` https://github.com/go-gitea/gitea/pull/11224 bring api for reviews - use them
6543 added the
kind
feature
label 2020-04-30 22:37:20 +00:00
6543 added this to the v0.5.0 milestone 2020-07-16 12:48:54 +00:00
6543 modified the milestone from v0.5.0 to v0.6.0 2020-09-14 01:24:27 +00:00
Contributor

I'll try it

I'll try it
Author
Owner
@crapStone https://gitea.com/gitea/go-sdk/src/branch/master/gitea/pull_review.go has the func you need :)
Contributor

...

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?

> ... > > 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?
Author
Owner

what do you think of:

tea pr lgtm as approve shortcut and tea pr review deny/accept/comment/reject(upcoming...) -text-

what do you think of: `tea pr lgtm` as approve shortcut and `tea pr review deny/accept/comment/reject(upcoming...) -text-`
6543 modified the milestone from v0.6.0 to v0.7.0 2020-12-11 14:11:25 +00:00
Member

@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 ```
Member

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,
}

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

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
Author
Owner

@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 ...
Owner

@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.
noerw added the
status/has-pull
label 2020-12-18 17:18:20 +00:00
6543 closed this issue 2020-12-21 15:22:24 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/tea#131
No description provided.