mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-11-22 03:52:37 +01:00
Fixes
This commit is contained in:
parent
6d0afe93e6
commit
5b02c25f73
3 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Phabricator-maintenance-bot
|
# Phabricator-maintenance-bot
|
||||||
Source for https://phabricator.wikimedia.org/p/Maintenance_bot/
|
Source for https://phabricator.wikimedia.org/p/Maintenance_bot/
|
||||||
|
|
||||||
* `column_mover.py` is a script that can perform additional actions when someone drags/changes a task in a workboard to a different column. E.g. Moving a task in workborad #user-ladsgroup from column "incoming" to column "done" will automatically change the task's status to "done"
|
* `column_mover.py` is a script that can move columns of a task when some actions happens on it. E.g. Moving a task in workborad #user-ladsgroup from column "incoming" to column "done" when someone changes the task's status to "done"
|
||||||
* `patchforreview_remover.py` is an automatic script that removes the "patch_for_review" tag when all patches have been merged or abandoned
|
* `patchforreview_remover.py` is an automatic script that removes the "patch_for_review" tag when all patches have been merged or abandoned
|
||||||
|
|
4
cron
4
cron
|
@ -1,3 +1,3 @@
|
||||||
15 * * * * jsub -once -N column_mover python3 /data/project/phabbot/phabbot/column_mover.py >/dev/null 2>&1
|
15 * * * * jsub -once -N column_mover python3 /data/project/phabbot/phabbot/column_mover.py /data/project/phabbot/phabbot/creds.json 3600 >/dev/null 2>&1
|
||||||
10 * * * * jsub -once -N patch_for_review python3 /data/project/phabbot/phabbot/patchforreview_remover.py >/dev/null 2>&1
|
10 * * * * jsub -once -N patch_for_review python3 /data/project/phabbot/phabbot/patchforreview_remover.py /data/project/phabbot/phabbot/creds.json 3600 >/dev/null 2>&1
|
||||||
5 * * * * jsub -once -N updater bash /data/project/phabbot/phabbot/updater.sh >/dev/null 2>&1
|
5 * * * * jsub -once -N updater bash /data/project/phabbot/phabbot/updater.sh >/dev/null 2>&1
|
||||||
|
|
5
lib.py
5
lib.py
|
@ -1,5 +1,6 @@
|
||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
import sys
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ class Client(object):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def newFromCreds(cls):
|
def newFromCreds(cls):
|
||||||
with open('creds.json', 'r') as f:
|
with open(sys.argv[1], 'r') as f:
|
||||||
creds = json.loads(f.read())
|
creds = json.loads(f.read())
|
||||||
return cls(*creds)
|
return cls(*creds)
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ class Client(object):
|
||||||
'limit': 100,
|
'limit': 100,
|
||||||
'constraints': {
|
'constraints': {
|
||||||
'projects': [project_phid],
|
'projects': [project_phid],
|
||||||
"modifiedStart": int(time.time() - 3600)
|
"modifiedStart": int(time.time() - int(sys.argv[2]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if continue_:
|
if continue_:
|
||||||
|
|
Loading…
Reference in a new issue