Add subcomand 'pulls create' #144

Merged
6543 merged 13 commits from 6543/tea:pulls-create into master 2020-07-16 15:00:54 +00:00
Owner

complete #59

close #8

complete #59 close #8
6543 added this to the v0.4.0 milestone 2020-07-13 14:54:58 +00:00
6543 added the
kind
feature
status/wip
labels 2020-07-13 14:54:58 +00:00
6543 added 2 commits 2020-07-13 14:55:00 +00:00
Add pull-request command
Some checks failed
continuous-integration/drone/pr Build is failing
c50a65182b
Merge branch 'master' into pulls-create
All checks were successful
continuous-integration/drone/pr Build is passing
8b9c093c6f
6543 changed title from [Feature] pulls create to Add subcomand 'pulls create' 2020-07-13 15:08:35 +00:00
6543 added 1 commit 2020-07-13 15:15:09 +00:00
refactor
All checks were successful
continuous-integration/drone/pr Build is passing
e0d5487da0
Owner

If no parameters, we just send the current branch to origin remote base repository's default branch.

If no parameters, we just send the current branch to origin remote base repository's default branch.
6543 added 2 commits 2020-07-13 15:56:49 +00:00
impruve
All checks were successful
continuous-integration/drone/pr Build is passing
7440e6053b
Author
Owner

@lunny didnt read your commit but was already on it ?

how do you like it now?

@lunny didnt read your commit but was already on it ? how do you like it now?
6543 added 1 commit 2020-07-13 22:39:53 +00:00
Merge branch 'master' into pulls-create
All checks were successful
continuous-integration/drone/pr Build is passing
350cc0bd7b
techknowlogick reviewed 2020-07-13 22:42:32 +00:00
Dismissed
cmd/pulls.go Outdated
@ -267,0 +315,4 @@
head := ctx.String("head")
// default is current one
if len(head) == 0 {
head = localRepo.TeaGetCurrentBranchName()

There is a chance that head == "" (ex. if TeaGetCurrentBranchName errors), should this be handled?

There is a chance that `head == ""` (ex. if `TeaGetCurrentBranchName` errors), should this be handled?
Author
Owner

good question I dont know yet ...

good question I dont know yet ...
Author
Owner

@techknowlogick
422 Unprocessable Entity: [{"fieldNames":["Head"],"classification":"RequiredError","message":"Required"},{"fieldNames":["Title"],"classification":"RequiredError","message":"Required"}]

title and head are required :)

@techknowlogick `422 Unprocessable Entity: [{"fieldNames":["Head"],"classification":"RequiredError","message":"Required"},{"fieldNames":["Title"],"classification":"RequiredError","message":"Required"}]` title and head are required :)
Owner

So this is only for origin repository branches pull requests? No forked repository?

So this is only for origin repository branches pull requests? No forked repository?
Author
Owner

I'd like to get basic feature it first and enhance it later

so you can create pulls from forks but only manualy not automaticaly by branch remote rev
at the moment

I'd like to get basic feature it first and enhance it later so you can create pulls from forks but only manualy not automaticaly by branch remote rev at the moment
6543 marked this conversation as resolved
6543 added 1 commit 2020-07-14 02:18:17 +00:00
finish
All checks were successful
continuous-integration/drone/pr Build is passing
b48de90493
6543 added 1 commit 2020-07-14 02:29:28 +00:00
🚀
All checks were successful
continuous-integration/drone/pr Build is passing
ed172076e6
6543 removed the
status/wip
label 2020-07-14 02:29:44 +00:00
Author
Owner

@lunny @techknowlogick ready to review :)

@lunny @techknowlogick ready to review :)
lunny reviewed 2020-07-14 04:21:16 +00:00
Dismissed
cmd/pulls.go Outdated
@ -267,0 +348,4 @@
Head: head,
Base: base,
Title: title,
Body: ctx.String("body"),
Owner

description?

`description`?
6543 marked this conversation as resolved
6543 added 1 commit 2020-07-14 08:59:44 +00:00
fix body
All checks were successful
continuous-integration/drone/pr Build is passing
82814efb4d
6543 added the
status/needs-reviews
label 2020-07-14 14:57:46 +00:00
lunny approved these changes 2020-07-14 16:04:32 +00:00
Dismissed
jolheiser requested changes 2020-07-15 14:14:08 +00:00
Dismissed
jolheiser left a comment
Owner

Few nits

Few nits
cmd/pulls.go Outdated
@ -267,0 +325,4 @@
}
// push if possible
_ = localRepo.Push(&git.PushOptions{})
Owner

If this fails, even if it doesn't kill the whole operation, should it inform the user?

If this fails, even if it doesn't kill the whole operation, should it inform the user?
cmd/pulls.go Outdated
@ -267,0 +340,4 @@
}
// title is required
if len(title) == 0 {
fmt.Printf("Can't create a title has to be set")
Owner

Maybe something like

Title is required
Maybe something like ``` Title is required ```
cmd/pulls.go Outdated
@ -267,0 +355,4 @@
log.Fatal(err)
}
fmt.Printf("#%d %s\n%s created %s\n", pr.Index,
Owner

Perhaps a link to the pull request here would be nice?

Perhaps a link to the pull request here would be nice?
6543 added 3 commits 2020-07-15 15:17:05 +00:00
Author
Owner

@jolheiser done

@jolheiser done
jolheiser reviewed 2020-07-15 18:06:56 +00:00
Dismissed
cmd/pulls.go Outdated
@ -267,0 +344,4 @@
// push if possible
err = localRepo.Push(&git.PushOptions{})
if err != nil {
fmt.Printf("Error ocure on 'git push':\n%s\n", err.Error())
Owner
fmt.Printf("Error occurred during 'git push':\n%s\n", err.Error())
``` fmt.Printf("Error occurred during 'git push':\n%s\n", err.Error()) ```
6543 marked this conversation as resolved
6543 added 1 commit 2020-07-16 07:06:53 +00:00
wordings
All checks were successful
continuous-integration/drone/pr Build is passing
192f7b8eac
6543 requested review from jolheiser 2020-07-16 07:06:57 +00:00
lafriks approved these changes 2020-07-16 14:52:08 +00:00
Dismissed
6543 merged commit f1801f39a6 into master 2020-07-16 15:00:54 +00:00
6543 deleted branch pulls-create 2020-07-16 15:01:10 +00:00
6543 removed the
status/needs-reviews
label 2020-07-16 15:03:28 +00:00
Sign in to join this conversation.
No description provided.