aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2019-01-11 09:09:36 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2019-01-11 09:09:36 -0500
commit806a9b690b54c19bd96e4c0eca507029b5ceb6be (patch)
tree25a13bcb634895c601bd167f2ab26e5917df877c
parent19a3d3e30702b8927b8b33e5bbc4bd40c50df9e4 (diff)
downloadkorg-helpers-806a9b690b54c19bd96e4c0eca507029b5ceb6be.tar.gz
Replace spaces with dashes in state names
Patchwork sneakily replaces spaces with dashes in state names for REST API purposes. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xgit-patchwork-bot.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-patchwork-bot.py b/git-patchwork-bot.py
index a3a5f76..9d59437 100755
--- a/git-patchwork-bot.py
+++ b/git-patchwork-bot.py
@@ -1011,7 +1011,8 @@ def pwrun(repo, cmdconfig, nomail, dryrun):
for refname, hashpairs in rpwhashes.items():
logger.info('Analyzing %d revisions', len(hashpairs))
- to_state = statemap[refname][0].lower()
+ # Patchwork lowercases state name and replaces spaces with dashes
+ to_state = statemap[refname][0].lower().replace(' ', '-')
# We create patch_id->rev mapping first
revs = dict()