jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/327394 )
Change subject: Also show announcements on beta cluster
......................................................................
Also show announcements on beta cluster
So we can test announcement changes there.
Change-Id: I32c29accc354d679daf151375d0eb02e255d2d15
---
M lib/mobile-util.js
M routes/announcements.js
2 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
jenkins-bot: Verified
Mholloway: Looks good to me, approved
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 37bf3f8..11daa2c 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -108,6 +108,10 @@
return domain.split('.')[0];
};
+mUtil.isEnglishWikipedia = function(domain) {
+ return (domain === 'en.wikipedia.org' || domain ===
'en.wikipedia.beta.wmflabs.org');
+};
+
// Merge two arrays of objects by the specified property.
// Stolen from https://jsfiddle.net/guya/eAWKR/.
mUtil.mergeByProp = function(arr1, arr2, prop, pushIfKeyNotFound) {
diff --git a/routes/announcements.js b/routes/announcements.js
index eedb72e..e49ba64 100644
--- a/routes/announcements.js
+++ b/routes/announcements.js
@@ -111,7 +111,7 @@
*/
router.get('/announcements', (req, res) => {
const json = {
- announce: req.params.domain === 'en.wikipedia.org' ?
getEnwikiAnnouncements() : []
+ announce: mUtil.isEnglishWikipedia(req.params.domain) ?
getEnwikiAnnouncements() : []
};
const hash = mUtil.hashCode(JSON.stringify(json));
--
To view, visit https://gerrit.wikimedia.org/r/327394
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I32c29accc354d679daf151375d0eb02e255d2d15
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: Mholloway <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: Niedzielski <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits