Skip to content

Commit 42fe335

Browse files
authored
Merge branch 'release/v1.23' into lunny/release_note_1.23.5
2 parents 66854aa + 69d35ee commit 42fe335

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

.github/workflows/pull-db-tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,11 @@ jobs:
202202
test-mssql:
203203
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
204204
needs: files-changed
205-
# specifying the version of ubuntu in use as mssql fails on newer kernels
206-
# pending resolution from vendor
207-
runs-on: ubuntu-20.04
205+
# NOTE: mssql-2017 docker image will panic when run on hosts that have Ubuntu newer than 20.04
206+
runs-on: ubuntu-latest
208207
services:
209208
mssql:
210-
image: mcr.microsoft.com/mssql/server:2017-latest
209+
image: mcr.microsoft.com/mssql/server:2019-latest
211210
env:
212211
ACCEPT_EULA: Y
213212
MSSQL_PID: Standard

services/webhook/general.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import (
99
"net/url"
1010
"strings"
1111

12+
user_model "code.gitea.io/gitea/models/user"
1213
webhook_model "code.gitea.io/gitea/models/webhook"
14+
"code.gitea.io/gitea/modules/base"
1315
"code.gitea.io/gitea/modules/setting"
1416
api "code.gitea.io/gitea/modules/structs"
1517
"code.gitea.io/gitea/modules/util"
@@ -308,12 +310,16 @@ func getPackagePayloadInfo(p *api.PackagePayload, linkFormatter linkFormatter, w
308310
}
309311

310312
func getStatusPayloadInfo(p *api.CommitStatusPayload, linkFormatter linkFormatter, withSender bool) (text string, color int) {
311-
refLink := linkFormatter(p.TargetURL, p.Context+"["+p.SHA+"]:"+p.Description)
313+
refLink := linkFormatter(p.TargetURL, fmt.Sprintf("%s [%s]", p.Context, base.ShortSha(p.SHA)))
312314

313-
text = fmt.Sprintf("Commit Status changed: %s", refLink)
315+
text = fmt.Sprintf("Commit Status changed: %s - %s", refLink, p.Description)
314316
color = greenColor
315317
if withSender {
316-
text += fmt.Sprintf(" by %s", linkFormatter(setting.AppURL+url.PathEscape(p.Sender.UserName), p.Sender.UserName))
318+
if user_model.IsGiteaActionsUserName(p.Sender.UserName) {
319+
text += fmt.Sprintf(" by %s", p.Sender.FullName)
320+
} else {
321+
text += fmt.Sprintf(" by %s", linkFormatter(setting.AppURL+url.PathEscape(p.Sender.UserName), p.Sender.UserName))
322+
}
317323
}
318324

319325
return text, color

services/webhook/matrix.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"strings"
1616

1717
webhook_model "code.gitea.io/gitea/models/webhook"
18+
"code.gitea.io/gitea/modules/base"
1819
"code.gitea.io/gitea/modules/git"
1920
"code.gitea.io/gitea/modules/json"
2021
"code.gitea.io/gitea/modules/log"
@@ -245,8 +246,8 @@ func (m matrixConvertor) Package(p *api.PackagePayload) (MatrixPayload, error) {
245246
}
246247

247248
func (m matrixConvertor) Status(p *api.CommitStatusPayload) (MatrixPayload, error) {
248-
refLink := htmlLinkFormatter(p.TargetURL, p.Context+"["+p.SHA+"]:"+p.Description)
249-
text := fmt.Sprintf("Commit Status changed: %s", refLink)
249+
refLink := htmlLinkFormatter(p.TargetURL, fmt.Sprintf("%s [%s]", p.Context, base.ShortSha(p.SHA)))
250+
text := fmt.Sprintf("Commit Status changed: %s - %s", refLink, p.Description)
250251

251252
return m.newPayload(text)
252253
}

0 commit comments

Comments
 (0)