[PATCH] D133476: [automation] Add scripts to automate GitHub projects

Konrad Wilhelm Kleine via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 01:55:29 PDT 2022


kwk added inline comments.


================
Comment at: llvm/utils/git/github-project.py:201-204
+# Get the issue id by the issue number
+def issue_id(issue_id: int) -> str:
+  data = graphql(ISSUE_ID, {"org": "llvm", "repo": "llvm-project", "number": issue_id})
+  return gv(data, "data.organization.repository.issue.id", 0)
----------------
According to https://github.blog/2021-11-16-graphql-global-id-migration-update/ you can pass an extra header `'X-Github-Next-Global-ID': '1'` and you'll get the id automatically. See here for how I do it: https://github.com/kwk/ghgql/blob/main/src/ghgql/ghgql.py#L70 . I'm not sure if this helps the problem but I sense that we can get rid of some dance with the API. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133476



More information about the llvm-commits mailing list