[x]):When I try to create pull request with one or more assignees I get 500 error. Error doesn't show up if nobody is assigned. I'm able to add assignees only for already existing pull requests.
Log error:
2018/07/10 15:41:42 [...routers/repo/pull.go:836 CompareAndPullRequestPost()] [E] NewPullRequest: newIssue: loadPullRequest: pull request does not exist [id: 0, issue_id: 24, head_repo_id: 0, base_repo_id: 0, head_branch: , base_branch: ]
There is form of spaghetti in code:
First, newIssue is called. It creates new issue and puts it into database.
newIssue function calls ChangeAssignee for each assigner in created issue.
ChangeAssignee calls loadPullRequest to load pull request information (for supsequent webhook calls), but pull request is not ready yet.
I see two possible solutions:
Both look like dirty workarounds for me, but if some of them is acceptible, implement it (or I could implement it, although i'm not golang coder, but syntax looks clear for me)
This seems to affect 1.5.0, why not backport?
Ah, it was backported. Maybe this could be made clearer some way?
Yes for backported issues milestone should be changed
Most helpful comment
Yes for backported issues milestone should be changed