Skip to content

Commit 36943e5

Browse files
6543lafriks
andcommitted
Add "Update Branch" button to Pull Requests (#9784)
* add Divergence * add Update Button * first working version * re-use code * split raw merge commands and db-change functions (notify, cache, ...) * use rawMerge (remove redundant code) * own function to get Diverging of PRs * use FlashError * correct Error Msg * hook is triggerd ... so remove comment * add "branch2" to "user2/repo1" because it unit-test "TestPullView_ReviewerMissed" use it but dont exist jet :/ * move GetPerm to IsUserAllowedToUpdate * add Flash Success MSG * imprufe code - remove useless js chage * fix-lint * TEST: add PullRequest ID:5 Repo: user2/repo1 Base: branch1 Head: pr-to-update * correct comments * make PR5 outdated * fix Tests * WIP: add pull update test * update revs * update locales * working TEST * update UI * misspell * change style * add 1s delay so rev exist * move row up (before merge row) * fix lint nit * UI remove divider * Update style * nits * do it right * introduce IsSameRepo * remove useless check Co-authored-by: Lauris BH <[email protected]>
1 parent 9f40bb0 commit 36943e5

32 files changed

+489
-68
lines changed

integrations/api_issue_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ func TestAPISearchIssue(t *testing.T) {
134134
var apiIssues []*api.Issue
135135
DecodeJSON(t, resp, &apiIssues)
136136

137-
assert.Len(t, apiIssues, 8)
137+
assert.Len(t, apiIssues, 9)
138138

139139
query := url.Values{}
140140
query.Add("token", token)
141141
link.RawQuery = query.Encode()
142142
req = NewRequest(t, "GET", link.String())
143143
resp = session.MakeRequest(t, req, http.StatusOK)
144144
DecodeJSON(t, resp, &apiIssues)
145-
assert.Len(t, apiIssues, 8)
145+
assert.Len(t, apiIssues, 9)
146146

147147
query.Add("state", "closed")
148148
link.RawQuery = query.Encode()
@@ -163,5 +163,5 @@ func TestAPISearchIssue(t *testing.T) {
163163
req = NewRequest(t, "GET", link.String())
164164
resp = session.MakeRequest(t, req, http.StatusOK)
165165
DecodeJSON(t, resp, &apiIssues)
166-
assert.Len(t, apiIssues, 0)
166+
assert.Len(t, apiIssues, 1)
167167
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
65f1bf27bc3bf70f64657658635e66094edbcb4d refs/heads/master
2+
985f0301dba5e7b34be866819cd15ad3d8f508ee refs/heads/branch2
3+
62fb502a7172d4453f0322a2cc85bddffa57f07a refs/heads/pr-to-update

0 commit comments

Comments
 (0)