File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -181,11 +181,13 @@ func (lm *LabelMutex) processPR() error {
181181 success , existingValue , lockErr := lm .uriLocker .Lock (lockValue )
182182 if success {
183183 lm .locked = true
184+ lm .htmlURL = lockValue
184185 log .Printf ("Weird, the lock should have already been ours!" )
185186 return nil
186187 }
187188 if existingValue == lockValue {
188189 lm .locked = true
190+ lm .htmlURL = lockValue
189191 return nil
190192 }
191193 return lockErr
Original file line number Diff line number Diff line change @@ -160,6 +160,19 @@ func init() {
160160 unlockedOutput : "false" ,
161161 htmlURLOutput : "https://github.com/urcomputeringpal/label-mutex/pull/1" ,
162162 },
163+ // sync the pr
164+ {
165+ eventFilename : "testdata/1/pull_request.synchronize_with_labels.json" ,
166+ eventName : "pull_request" ,
167+ label : "staging" ,
168+ issuesClient : & happyPathLabelClient {},
169+ uriLocker : URILockerOne ,
170+ err : false ,
171+ locked : true ,
172+ lockedOutput : "true" ,
173+ unlockedOutput : "false" ,
174+ htmlURLOutput : "https://github.com/urcomputeringpal/label-mutex/pull/1" ,
175+ },
163176 // try to read it
164177 {
165178 eventFilename : "testdata/push.json" ,
You can’t perform that action at this time.
0 commit comments