I recently experienced a situation where the plugin sent a notification about a build which included 2 commits, of the following format:
Commit 1:
foo/bar - edit
foo/baz - edit
Commit 2:
foo/bar - edit
The notification claimed that 3 files were changed. When looking above, it's clear that only 2 files were affected.
It appears this is due to the use of a HashSet<AffectedFile> in ActiveNotifier.getChanges, which i'm guessing the implementation for the AffectedFile interface must not hash based on purely the filename alone. This was using a git repository. I believe it's safer to either use the original getAffectedPaths method, or to get the Paths from each AffectedFile so that the set is based correctly on file paths.
I recently experienced a situation where the plugin sent a notification about a build which included 2 commits, of the following format: Commit 1:
The notification claimed that 3 files were changed. When looking above, it's clear that only 2 files were affected.
It appears this is due to the use of a
HashSet<AffectedFile>
inActiveNotifier.getChanges
, which i'm guessing the implementation for theAffectedFile
interface must not hash based on purely the filename alone. This was using a git repository. I believe it's safer to either use the originalgetAffectedPaths
method, or to get the Paths from each AffectedFile so that the set is based correctly on file paths.