[libcxx-commits] [libcxx] [libc++] Create issues in batch in libcxx/utils/conformance (PR #204428)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 17 12:53:42 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

<details>
<summary>Changes</summary>

Also improve the output as a drive-by. Creating issues in batch makes it easier to automate the creation of these issues.

Assisted by Claude, tweaked and reviewed by hand

---
Full diff: https://github.com/llvm/llvm-project/pull/204428.diff


1 Files Affected:

- (modified) libcxx/utils/conformance (+24-21) 


``````````diff
diff --git a/libcxx/utils/conformance b/libcxx/utils/conformance
index d24b99347ae91..9f34c4e66bd08 100755
--- a/libcxx/utils/conformance
+++ b/libcxx/utils/conformance
@@ -353,7 +353,7 @@ def link_github_issue(issue: str, meeting_voted: Optional[str], status: Optional
         cli = ['gh', 'project', 'item-edit', '--id', id,
                                 '--project-id', LIBCXX_CONFORMANCE_PROJECT_ID,
                                 '--field-id', LIBCXX_CONFORMANCE_MEETING_VOTED_ID, '--text', meeting_voted]
-        subprocess.check_call(cli)
+        subprocess.check_call(cli, stdout=subprocess.DEVNULL)
 
     # Adjust the 'Status' field of the item
     if status is not None:
@@ -362,7 +362,7 @@ def link_github_issue(issue: str, meeting_voted: Optional[str], status: Optional
                                 '--project-id', LIBCXX_CONFORMANCE_PROJECT_ID,
                                 '--field-id', LIBCXX_CONFORMANCE_STATUS_ID,
                                 '--single-select-option-id', option_id]
-        subprocess.check_call(cli)
+        subprocess.check_call(cli, stdout=subprocess.DEVNULL)
 
 def sync_csv(rows: List[Tuple], from_github: List[PaperInfo]) -> List[Tuple]:
     """
@@ -524,6 +524,8 @@ def github_create(csvfiles, load_github_from, labels):
                     continue
                 yield row
 
+    all_labels = ('libc++', *labels)
+    to_create = []
     for row in all_csv_rows():
         paper = PaperInfo.from_csv_row(row)
 
@@ -536,35 +538,36 @@ def github_create(csvfiles, load_github_from, labels):
             logging.warning(f"Found row claiming to have a tracking issue, but failed to find a tracking issue on Github: {row}")
             continue
 
-        # Create the actual Github issue
+        title = rst_to_markdown(paper.paper_name)
         body = f'**Link:** https://wg21.link/{paper.paper_number}'
         if paper.notes:
             body += f'\n\n```\nBEGIN-RST-NOTES\n{paper.notes}\nEND-RST-NOTES\n```'
 
         cli = ['gh', 'issue', 'create', '--repo', 'llvm/llvm-project',
-                    '--title', f'{paper.paper_number}: {rst_to_markdown(paper.paper_name)}',
+                    '--title', f'{paper.paper_number}: {title}',
                     '--body', body,
-                    '--project', 'libc++ Standards Conformance',
-                    '--label', 'libc++']
-
-        for label in labels:
+                    '--project', 'libc++ Standards Conformance']
+        for label in all_labels:
             cli += ['--label', label]
 
-        print("Do you want to create the following issue?")
-        print(cli)
-        answer = input("y/n: ")
-        if answer == 'n':
-            print("Not creating issue")
-            continue
-        elif answer != 'y':
-            print(f"Invalid answer {answer}, skipping")
-            continue
+        to_create.append((paper, title, cli))
 
-        logging.info("Creating issue")
-        issue_link = subprocess.check_output(cli).decode().strip()
-        logging.info(f"Created tracking issue for {paper.paper_number}: {issue_link}")
+    if not to_create:
+        print("No new issues to create.")
+        return
+
+    print(f"Will create {len(to_create)} issue(s) with labels: {', '.join(all_labels)}")
+    for paper, title, _ in to_create:
+        print(f"  {paper.paper_number}: {title}")
+    answer = input(f"\nCreate all {len(to_create)} issue(s)? [y/N]: ")
+    if answer.strip().lower() != 'y':
+        print("Aborted, no issues created.")
+        return
 
-        logging.info(f"Linking {issue_link} to the libc++ Standards Conformance project")
+    for i, (paper, _, cli) in enumerate(to_create, 1):
+        print(f"[{i}/{len(to_create)}] Creating {paper.paper_number}... ", end='', flush=True)
+        issue_link = subprocess.check_output(cli).decode().strip()
+        print(issue_link)
         link_github_issue(issue_link, paper.meeting, paper.status)
 
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/204428


More information about the libcxx-commits mailing list