Event Timeline
Comment Actions
created with this python code and a csv of the task data exported from phabricator as maniphest_tasks.csv
gerrit.py
import requests import sys import json tid = sys.argv[1] query = {'q': f"bug:{tid}"} url = 'https://gerrit.wikimedia.org/r/changes/' res = requests.get(url, params=query) jsontxt = res.text[4:] objs = json.loads(jsontxt) for obj in objs: print(f"{tid},{obj['change_id']},-{obj['deletions']},+{obj['insertions']}")
install csvkit:
pip3 install csvkit
pass task ids to gerrit.py
csvcut -c 3 -K 1 maniphest_tasks.csv | xargs -n1 python3 gerrit.py
This could be improved to not need csvcut or for that matter to not even need a csv file at all (just query phabricator's api directly)