Add subcomand 'pulls create' #144

Merged
6543 merged 13 commits from 6543/tea:pulls-create into master 2 years ago
6543 commented 2 years ago
Collaborator

complete #59

close #8

complete #59 close #8
6543 added this to the v0.4.0 milestone 2 years ago
6543 added the kind/feature status/wip labels 2 years ago
6543 added 2 commits 2 years ago
continuous-integration/drone/pr Build is failing Details
c50a65182b
Add pull-request command
continuous-integration/drone/pr Build is passing Details
8b9c093c6f
Merge branch 'master' into pulls-create
6543 changed title from [Feature] pulls create to Add subcomand 'pulls create' 2 years ago
6543 added 1 commit 2 years ago
continuous-integration/drone/pr Build is passing Details
e0d5487da0
refactor
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 2 years ago
Poster
Collaborator

@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 2 years ago
continuous-integration/drone/pr Build is passing Details
350cc0bd7b
Merge branch 'master' into pulls-create
techknowlogick reviewed 2 years ago
Dismissed
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?
Poster
Collaborator

good question I dont know yet ...

good question I dont know yet ...
Poster
Collaborator

@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?
Poster
Collaborator

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 2 years ago
continuous-integration/drone/pr Build is passing Details
b48de90493
finish
6543 added 1 commit 2 years ago
continuous-integration/drone/pr Build is passing Details
ed172076e6
🚀
6543 removed the status/wip label 2 years ago
Poster
Collaborator

@lunny @techknowlogick ready to review :)

@lunny @techknowlogick ready to review :)
lunny reviewed 2 years ago
Dismissed
cmd/pulls.go Outdated
Head: head,
Base: base,
Title: title,
Body: ctx.String("body"),
Owner

description?

`description`?
6543 marked this conversation as resolved
6543 added 1 commit 2 years ago
continuous-integration/drone/pr Build is passing Details
82814efb4d
fix body
6543 added the status/needs-reviews label 2 years ago
lunny approved these changes 2 years ago
Dismissed
jolheiser requested changes 2 years ago
Dismissed
jolheiser left a comment
Collaborator

Few nits

Few nits
cmd/pulls.go Outdated
}
// push if possible
_ = localRepo.Push(&git.PushOptions{})
Collaborator

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
}
// title is required
if len(title) == 0 {
fmt.Printf("Can't create a title has to be set")
Collaborator

Maybe something like

Title is required
Maybe something like ``` Title is required ```
cmd/pulls.go Outdated
log.Fatal(err)
}
fmt.Printf("#%d %s\n%s created %s\n", pr.Index,
Collaborator

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 2 years ago
Poster
Collaborator

@jolheiser done

@jolheiser done
jolheiser reviewed 2 years ago
Dismissed
cmd/pulls.go Outdated
// push if possible
err = localRepo.Push(&git.PushOptions{})
if err != nil {
fmt.Printf("Error ocure on 'git push':\n%s\n", err.Error())
Collaborator
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 2 years ago
continuous-integration/drone/pr Build is passing Details
192f7b8eac
wordings
6543 requested review from jolheiser 2 years ago
lafriks approved these changes 2 years ago
Dismissed
6543 referenced this issue from a commit 2 years ago
6543 merged commit f1801f39a6 into master 2 years ago
6543 deleted branch pulls-create 2 years ago
6543 removed the status/needs-reviews label 2 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as f1801f39a6.
Sign in to join this conversation.
Loading…
There is no content yet.