[PATCH] D126423: github: Automatically assign reviewers for backport requests

Konrad Wilhelm Kleine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 01:06:10 PDT 2022


kwk accepted this revision.
kwk added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/utils/git/github-automation.py:78
+        "constraints[repositories][0]" : "PHID-REPO-f4scjekhnkmh7qilxlcy",
+        "limit" : 1
+    }
----------------
I tried to find `limit` in the [documentation (see section "Paging and Limits")](https://reviews.llvm.org/conduit/method/diffusion.commit.search/) and it is always used like this:

```lang=json
{
   "cursor": {
       "limit": 100
   }
}
```

I wonder if this only works because of luck that there only is 1 result.


================
Comment at: llvm/utils/git/github-automation.py:94
+    r = phab_api_call(phab_token, "https://reviews.llvm.org/api/differential.parsecommitmessage", args)
+    review_id = r['result']['revisionIDFieldInfo']['value']
+
----------------
Are fields safe to access or is there any guarantee that a field exists in a result? Should fields be tested for existence before accessing them?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126423/new/

https://reviews.llvm.org/D126423



More information about the llvm-commits mailing list