I have a Herald rule that triggers when an author that belongs to a project creates a differential review.
I just had an author submit a review that belongs to a specific project, and the rule failed.
Here are the details:
The Herald Transcript:
Object Transcript Object Name [redacted] Object Type differential Object PHID PHID-DREV-cvw2r2ieqtglneyxbktf Object Link [redacted] Run At Epoch July 19th, 1:19:59 PM Run On Host [redacted] Run Duration 35 ms Field: Affected files [redacted] Field: Repository PHID-REPO-3p2nkuxizgwvohnvyqhd Field: Author's projects PHID-PROJ-rwnekrajar5m6diprobx PHID-PROJ-57zl354uoo6jmbrxdlk4 PHID-PROJ-mvufznfaunwayvajirkf Field: Changed file content Field: Added file content Field: Affected packages Field: Affected package owners Field: Projects
Some debugging:
I want to confirm the author PHID from the differential request, so I call differential.query. Here are the relevant bits:
{
"0": {
"id": "1169",
"phid": "PHID-DREV-cvw2r2ieqtglneyxbktf",
"authorPHID": "PHID-USER-i3vrb63exn73dtqf5mdg",
"status": "3",
"auxiliary": {
"phabricator:projects": [],
"phabricator:depends-on": []
},
}
}So, we have the author PHID (PHID-USER-i3vrb63exn73dtqf5mdg), now I want to see what projects they are a member of, so I call:
$ echo '{ "members": [ "PHID-USER-i3vrb63exn73dtqf5mdg" ] }' | arc call-conduit --conduit-uri <url> --conduit-token <conduit-token> project.query
and I get the three projects (by PHID):
- PHID-PROJ-mvufznfaunwayvajirkf
- PHID-PROJ-57zl354uoo6jmbrxdlk4
- PHID-PROJ-quo7cpreceuh6hnor3pw
here's the somewhat complete response:
(some bits redacted)
{
"data": {
"PHID-PROJ-mvufznfaunwayvajirkf": {
"id": "40",
"phid": "PHID-PROJ-mvufznfaunwayvajirkf",
"members": [
"PHID-USER-i3vrb63exn73dtqf5mdg",
"PHID-USER-qtmkswx7uabusa24ttpr",
"PHID-USER-xdhis3v6664sogsqk7sy",
"PHID-USER-zzbzmxianeh37gp6poix"
],
"PHID-PROJ-57zl354uoo6jmbrxdlk4": {
"id": "41",
"phid": "PHID-PROJ-57zl354uoo6jmbrxdlk4",
"members": [
"PHID-USER-xdhis3v6664sogsqk7sy",
"PHID-USER-i3vrb63exn73dtqf5mdg",
"PHID-USER-qtmkswx7uabusa24ttpr",
"PHID-USER-zzbzmxianeh37gp6poix"
],
"PHID-PROJ-quo7cpreceuh6hnor3pw": {
"id": "22",
"phid": "PHID-PROJ-quo7cpreceuh6hnor3pw",
"members": [
"PHID-USER-xdhis3v6664sogsqk7sy",
"PHID-USER-i3vrb63exn73dtqf5mdg",
"PHID-USER-qtmkswx7uabusa24ttpr",
"PHID-USER-zzbzmxianeh37gp6poix"
],
},
"slugMap": [],
"cursor": {
"limit": 100,
"after": null,
"before": null
}
}