There is a good amount of duplicate code in these 3 repos: section-topics, section-image-recs and image-suggestions.
This is brittle because a change/fix in one place will not automatically address the other(s) - it's all to easy to miss.
This is a burden because more work is required to see changes through in multiple places (where other logic might interfere or require alternative implementation)
In this task we should:
Compare duplicate code between these repos.See https://phabricator.wikimedia.org/T339120#8931247
- For any duplicate(-ish) code, we should come up with a strategy to share it from one source. Some ideas:
- keep it in one of them, delete from the other, and copy at compile time to the other.
- keep it in one of them, delete from the other, and git submodule from the other
- have a 'common' repo where these files reside.
- merge scripts into a monorepo <- PREFERRED OPTION
Note: there is some overlap with T333699; both should follow a similar resolution.