@@ -87,29 +87,13 @@ func (projectLock *PullRequestLock) Lock() (bool, error) {
8787 _ , isNoOpLock := projectLock .InternalLock .(* NoOpLock )
8888
8989 if lockAcquired && ! isNoOpLock {
90- comment := "Project " + projectLock .projectId () + " has been locked by PR #" + strconv .Itoa (projectLock .PrNumber )
91- reportingLockingSuccess (projectLock .Reporter , comment )
9290 slog .Info ("Project locked successfully" ,
9391 "projectId" , projectLock .projectId (),
9492 "prNumber" , projectLock .PrNumber )
9593 }
9694 return lockAcquired , nil
9795}
9896
99- func reportingLockingSuccess (r reporting.Reporter , comment string ) {
100- if r .SupportsMarkdown () {
101- _ , _ , err := r .Report (comment , utils .AsCollapsibleComment ("Locking successful" , false ))
102- if err != nil {
103- slog .Error ("Failed to publish comment" , "error" , err )
104- }
105- } else {
106- _ , _ , err := r .Report (comment , utils .AsComment ("Locking successful" ))
107- if err != nil {
108- slog .Error ("Failed to publish comment" , "error" , err )
109- }
110- }
111- }
112-
11397func reportLockingFailed (r reporting.Reporter , comment string ) {
11498 if r .SupportsMarkdown () {
11599 _ , _ , err := r .Report (comment , utils .AsCollapsibleComment ("Locking failed" , false ))
0 commit comments