RFR: 1925: When archiving a comment, mlbridgeBot would strip everything after the first command

Zhao Song zsong at openjdk.org
Thu Jun 1 22:32:48 UTC 2023


A user reported that there is no email generated for this comment. 
https://github.com/openjdk/jdk/pull/14114#issuecomment-1562126987 

It is caused by the initial `/csr needed` command. The root cause is that in `ArchiveWorkItem#ignoreComment`, any command would be treated as a multiline command. 

The logic about filtering out commands from a comment differs between `ArchiveWorkItem#ignoreComment` and `CommandExtractor#extractCommands`.

In this patch, I make the logic consistent in this two methods.

1. Any line starts with '/' followed by lowercase characters will be recognized as a command line. The command line will be stripped. 
2. Check whether this command is a multiline command. If so, the following lines will be considered as arguments of the command and the argument lines will be stripped until the bot found another command line.

-------------

Commit messages:
 - SKARA-1925

Changes: https://git.openjdk.org/skara/pull/1524/files
 Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1524&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-1925
  Stats: 101 lines in 5 files changed: 83 ins; 6 del; 12 mod
  Patch: https://git.openjdk.org/skara/pull/1524.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1524/head:pull/1524

PR: https://git.openjdk.org/skara/pull/1524


More information about the skara-dev mailing list