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

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 01:19:56 PDT 2022


tstellar added inline comments.


================
Comment at: llvm/utils/git/github-automation.py:78
+        "constraints[repositories][0]" : "PHID-REPO-f4scjekhnkmh7qilxlcy",
+        "limit" : 1
+    }
----------------
kwk wrote:
> 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.
I think that's just the output json?  If you put in an example query with the limit parameter, it shows the limit value being passed to curl simply as limit=1.


================
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']
+
----------------
kwk wrote:
> 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?
It looks like the fields are always there based on my testing.


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