Only show sender if it makes sense (#9601)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser authored and zeripath committed 2020-01-04 22:20:15 +00:00
1 parent 07439d8059
commit fb3a6aba7d
7 files changed
+71 -65

No files matched your search

+2 -2
View File
@@ -70,7 +70,7 @@ func TestSlackReleasePayload(t *testing.T) {
require.Nil(t, err)
require.NotNil(t, pl)
assert.Equal(t, "[<http://localhost:3000/test/repo|test/repo>] Release <http://localhost:3000/test/repo/src/v1.0|v1.0> created by <https://try.gitea.io/user1|user1>", pl.Text)
assert.Equal(t, "[<http://localhost:3000/test/repo|test/repo>] Release created: <http://localhost:3000/test/repo/src/v1.0|v1.0> by <https://try.gitea.io/user1|user1>", pl.Text)
}
func TestSlackPullRequestPayload(t *testing.T) {
@@ -84,5 +84,5 @@ func TestSlackPullRequestPayload(t *testing.T) {
require.Nil(t, err)
require.NotNil(t, pl)
assert.Equal(t, "[<http://localhost:3000/test/repo|test/repo>] Pull request <http://localhost:3000/test/repo/pulls/12|#2 Fix bug> opened by <https://try.gitea.io/user1|user1>", pl.Text)
assert.Equal(t, "[<http://localhost:3000/test/repo|test/repo>] Pull request opened: <http://localhost:3000/test/repo/pulls/12|#2 Fix bug> by <https://try.gitea.io/user1|user1>", pl.Text)
}