[libcxx-commits] [libcxx] 81072db - [libc++] Create issues in batch in libcxx/utils/conformance (#204428)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 17 12:55:54 PDT 2026
Author: Louis Dionne
Date: 2026-06-17T15:55:49-04:00
New Revision: 81072db8dd57c8a9b276708a35b33c3bbd3dbfc8
URL: https://github.com/llvm/llvm-project/commit/81072db8dd57c8a9b276708a35b33c3bbd3dbfc8
DIFF: https://github.com/llvm/llvm-project/commit/81072db8dd57c8a9b276708a35b33c3bbd3dbfc8.diff
LOG: [libc++] Create issues in batch in libcxx/utils/conformance (#204428)
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
Added:
Modified:
libcxx/docs/PostMeetingProcedure.rst
libcxx/utils/conformance
Removed:
################################################################################
diff --git a/libcxx/docs/PostMeetingProcedure.rst b/libcxx/docs/PostMeetingProcedure.rst
index b35f97afa1565..a7acaa1c6a4c0 100644
--- a/libcxx/docs/PostMeetingProcedure.rst
+++ b/libcxx/docs/PostMeetingProcedure.rst
@@ -75,10 +75,10 @@ Create the Github tracking issues
==================================
Once the CSV files are committed and any stray issues have been linked, the remaining missing
-Github issues can be created using ``libcxx/utils/conformance``. For each CSV row, it will
-create a Github issue (and ask for confirmation) if an issue does not already exist. The issue
-title, body and labels are all populated automatically, and they are appropriately linked to
-the libc++ conformance project. Run it once per CSV::
+Github issues can be created using ``libcxx/utils/conformance``. The script lists every issue
+it would create from the CSV (skipping rows that are already tracked) and asks for a confirmation
+before creating them. The issue title, body and labels are all populated automatically, and they
+are appropriately linked to the libc++ conformance project. Run it once per CSV::
libcxx/utils/conformance github create libcxx/docs/Status/Cxx<NN>Papers.csv \
--labels=wg21-paper --labels=c++<NN>
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)
More information about the libcxx-commits
mailing list