Interdiff uploaded to drupal.org issues is reversed (new→previous instead of previous→new)
Reported by @Berdir. The interdiff the bot uploads to drupal.org issues is **reversed**: it shows the change going from the *new* patch back to the *previously uploaded* patch, rather than from previous → new. ### Root cause In `RectorIssues\DrupalOrg\IssueCreator::createDiffFile()` the argument order passed to `interdiff` is swapped: ```php // issues_bot/src/DrupalOrg/IssueCreator.php exec("interdiff $file_path $previous_path > $diff_path"); ``` Here `$file_path` is the **new** patch and `$previous_path` is the **previously uploaded** bot patch. `interdiff` follows the convention `interdiff OLD NEW`, producing a diff that describes the changes needed to go *from old to new*. With the arguments swapped, the generated interdiff is reversed (it describes undoing the new patch's changes), which is confusing for reviewers reading the issue. ### Fix Swap the arguments so the previous (uploaded) patch comes first: ```php exec("interdiff $previous_path $file_path > $diff_path"); ``` ### Note The GitLab publisher (`GitLab\IssueCreator::interdiffPatches()`) already passes the arguments in the correct `prev, new` order, but it only uses the result for an emptiness check (change detection), so the direction is not user-visible there. Only the drupal.org publisher uploads the interdiff for humans to read, which is why this surfaces there. Ai was used for this issue
issue