Skip to content

Commit 7d3e745

Browse files
avoid pacchettibotti comment loop (#737)
1 parent 3e8af27 commit 7d3e745

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

app/src/App/GitHubIssue.purs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,11 @@ initializeGitHub = do
289289
Console.log "Skipping operation from pacchettibotti to avoid feedback loops."
290290
pure Nothing
291291

292-
MalformedJson issue err -> do
292+
MalformedJson _ "pacchettibotti" _ -> do
293+
Console.log "Skipping malformed JSON from pacchettibotti to avoid feedback loops."
294+
pure Nothing
295+
296+
MalformedJson issue _ err -> do
293297
let
294298
comment = String.joinWith "\n"
295299
[ "The JSON input for this package update is malformed:"
@@ -319,7 +323,7 @@ initializeGitHub = do
319323

320324
data OperationDecoding
321325
= NotJson
322-
| MalformedJson IssueNumber String
326+
| MalformedJson IssueNumber String String
323327
| DecodedOperation IssueNumber String (Either PackageSetOperation PackageOperation)
324328

325329
derive instance Eq OperationDecoding
@@ -370,7 +374,7 @@ readOperation eventPath = do
370374
let printedError = CJ.DecodeError.print jsonError
371375
Console.log $ "Malformed JSON:\n" <> printedError
372376
Console.log $ "Received body:\n" <> body
373-
pure $ MalformedJson issueNumber printedError
377+
pure $ MalformedJson issueNumber username printedError
374378
Right operation ->
375379
pure $ DecodedOperation issueNumber username operation
376380

0 commit comments

Comments
 (0)