]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix Danger rules for flagging release note issues
authorMichał Kępień <michal@isc.org>
Fri, 5 Jan 2024 11:51:13 +0000 (12:51 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 5 Jan 2024 12:01:26 +0000 (13:01 +0100)
commit0b43bf1a382e77571c5808e8ca73ea29d3a95c47
tree523eecdf5a8a0f30f1b45e369d1b85086e32ce96
parent86a78021fe6a63447f40552f8e6c44b374f50712
Fix Danger rules for flagging release note issues

The logic contained in dangerfile.py incorrectly warns about missing
release note changes for merge requests preparing release documentation
as such merge requests rename files in the doc/notes/ directory.  This
(correctly) causes these files to be passed to dangerfile.py via
danger.git.created_files and danger.git.deleted_files rather than via
danger.git.modified_files, which in turn causes the logic checking the
use of the "Release Notes" label to assume that no release notes are
added, removed, or modified by a given merge request.

Fix by considering all types of file changes (modifications, additions,
and removals - which also covers file renaming) when checking whether a
given merge request modifies release notes.  Update the warning messages
accordingly.

However, when trying to find release notes added by a given merge
request, deleted files must not be considered.  Tweak the logic looking
for GitLab identifiers in the release notes added by a given merge
request so that it only scans modified and added (or renamed) files.

(cherry picked from commit 0fec404c64cf367b9c2d676535c50f228355b6b5)
dangerfile.py