mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-23 17:53:23 +02:00
Merge pull request #650 from scottferg/master
Add verbose user repo feed
This commit is contained in:
commit
b93b244450
@ -113,7 +113,6 @@ WHERE c.repo_id = r.repo_id
|
|||||||
WHERE c.repo_id = r.repo_id
|
WHERE c.repo_id = r.repo_id
|
||||||
AND r.repo_id = p.repo_id
|
AND r.repo_id = p.repo_id
|
||||||
AND p.user_id = ?
|
AND p.user_id = ?
|
||||||
AND c.commit_status NOT IN ('Started', 'Pending')
|
|
||||||
GROUP BY r.repo_id
|
GROUP BY r.repo_id
|
||||||
) ORDER BY c.commit_created DESC LIMIT 5;
|
) ORDER BY c.commit_created DESC LIMIT 5;
|
||||||
`
|
`
|
||||||
|
@ -203,9 +203,16 @@ func TestCommitstore(t *testing.T) {
|
|||||||
Sha: "0a74b46d7d62b737b6906897f48dbeb72cfda222",
|
Sha: "0a74b46d7d62b737b6906897f48dbeb72cfda222",
|
||||||
Status: model.StatusSuccess,
|
Status: model.StatusSuccess,
|
||||||
}
|
}
|
||||||
|
commit4 := model.Commit{
|
||||||
|
RepoID: repo2.ID,
|
||||||
|
Branch: "bar",
|
||||||
|
Sha: "d923a61d8ad3d8d02db4fef0bf40a726bad0fc03",
|
||||||
|
Status: model.StatusStarted,
|
||||||
|
}
|
||||||
cs.PostCommit(&commit1)
|
cs.PostCommit(&commit1)
|
||||||
cs.PostCommit(&commit2)
|
cs.PostCommit(&commit2)
|
||||||
cs.PostCommit(&commit3)
|
cs.PostCommit(&commit3)
|
||||||
|
cs.PostCommit(&commit4)
|
||||||
perm1 := model.Perm{
|
perm1 := model.Perm{
|
||||||
RepoID: repo1.ID,
|
RepoID: repo1.ID,
|
||||||
UserID: 1,
|
UserID: 1,
|
||||||
@ -228,6 +235,8 @@ func TestCommitstore(t *testing.T) {
|
|||||||
g.Assert(commits[0].RepoID).Equal(commit1.RepoID)
|
g.Assert(commits[0].RepoID).Equal(commit1.RepoID)
|
||||||
g.Assert(commits[0].Branch).Equal(commit1.Branch)
|
g.Assert(commits[0].Branch).Equal(commit1.Branch)
|
||||||
g.Assert(commits[0].Sha).Equal(commit1.Sha)
|
g.Assert(commits[0].Sha).Equal(commit1.Sha)
|
||||||
|
g.Assert(commits[1].Sha).Equal(commit4.Sha)
|
||||||
|
g.Assert(commits[1].Status).Equal(commit4.Status)
|
||||||
})
|
})
|
||||||
|
|
||||||
g.It("Should enforce unique Sha + Branch", func() {
|
g.It("Should enforce unique Sha + Branch", func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user