Skip to content

Instantly share code, notes, and snippets.

@rhnvrm
Last active July 10, 2018 07:56
Show Gist options
  • Save rhnvrm/fca5d657ae66a2881f1aacea8a059973 to your computer and use it in GitHub Desktop.
Save rhnvrm/fca5d657ae66a2881f1aacea8a059973 to your computer and use it in GitHub Desktop.
Conduit (Phabricator API) Check Diff Status Script for use in WTF Terminal Dashboard
echo '{
"authors": [
"PHID-USER-jbsqsep23tcxn5l3ob3y"
],"status":"status-open"
}' | arc call-conduit differential.query | \
python3 -c "import sys, json;
r = json.load(sys.stdin)['response'];
l = [(x['uri'], x['statusName'], x['title']) for x in r];
display = \"{}\t{}\t{}\"
print(\"My Open Diffs:\")
for u,s,t in l:
print(display.format(u,s,t))
"
echo '{
"reviewers": [
"PHID-USER-jbsqsep23tcxn5l3ob3y"
],"status":"status-open"
}' | arc call-conduit differential.query | \
python3 -c "import sys, json;
r = json.load(sys.stdin)['response'];
l = [(x['uri'], x['statusName'], x['title']) for x in r];
display = \"{}\t{}\t{}\"
print(\"Needs My Review:\")
for u,s,t in l:
print(display.format(u,s,t))
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment