jenkins-bot has submitted this change and it was merged.
Change subject: pywikibot.DataSite.mergeItems must set the bot flag
......................................................................
pywikibot.DataSite.mergeItems must set the bot flag
As for other similar actions, the bot flag must be set by default.
Bug: T138287
Change-Id: Ie57064e77baca596b54cda8308cdd66fb4c67329
---
M pywikibot/site.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index f8c6996..4b7969b 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -7372,7 +7372,7 @@
@must_be(group='user')
@deprecated_args(ignoreconflicts='ignore_conflicts')
def mergeItems(self, fromItem, toItem, ignore_conflicts=False,
- summary=None):
+ summary=None, bot=True):
"""
Merge two items together.
@@ -7384,6 +7384,8 @@
@type ignore_conflicts: bool
@param summary: Edit summary
@type summary: str
+ @param bot: Whether to mark the edit as a bot edit
+ @type bot: bool
@return: dict API output
@rtype: dict
"""
@@ -7395,7 +7397,8 @@
'token': self.tokens['edit'],
'summary': summary,
}
-
+ if bot:
+ params['bot'] = 1
req = self._simple_request(**params)
data = req.submit()
return data
--
To view, visit https://gerrit.wikimedia.org/r/301776
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie57064e77baca596b54cda8308cdd66fb4c67329
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dachary <loic(a)dachary.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>
Build Update for wikimedia/pywikibot-core
-------------------------------------
Build: #3535
Status: Errored
Duration: 2 hours, 9 minutes, and 15 seconds
Commit: eec60b8 (master)
Author: Loic Dachary
Message: WikidataSPARQLPageGenerator should not always remove duplicates
get_items creates a set from the results, to avoid duplicates. It has
the unfortunate side effect of shuffling the results of all queries,
including those with an ORDER BY.
The result_type argument is added to allow the caller to change the
default set() to a list() to preserve order and duplicates.
Bug: T141348
Change-Id: I19873439e82f1a74797d1d2b2ac253086b38721e
View the changeset: https://github.com/wikimedia/pywikibot-core/compare/6c9766a28cdc...eec60b84…
View the full build log and details: https://travis-ci.org/wikimedia/pywikibot-core/builds/148245602
--
You can configure recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications