From patchwork Wed Dec 17 02:26:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 943 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938470; bh=16MQfQDKObAPtWTKr1MzqrdnJbj6Uz9viZN5TQOVnIs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LeovZSHpoqIEq9G16q3rPhjQFTLJSmmQaUEs5xyqYie+n+XFTd6k9LAZrgOrRS5QJ vGndrBq0GUVcNNNtflsB/brnoRKweZoFozgYlPEe2K17US0yVcJtubolfeOzruJidR jFIbO+L6JD/afKnIV/IMV52T5oE/0u9Tcc256hbnciahzkVURijzbYypqcQIFjVgWp /7cVkYyt8zwi/aG3pgXoPPJHs+7V93zDwnFdD3C0UdzVT9hNtI85/S7CyYvTey5eFO iMOGHlObjWWnZhwV643/OWATE6QmWAI1qBjTq2jYpka7q7BjBLpY8EM3ctZC9NsUtH R8Aq8O0yGZSkw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 799FB68BAD for ; Tue, 16 Dec 2025 19:27:50 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id TAVMroVFhiaj for ; Tue, 16 Dec 2025 19:27:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938470; bh=16MQfQDKObAPtWTKr1MzqrdnJbj6Uz9viZN5TQOVnIs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LeovZSHpoqIEq9G16q3rPhjQFTLJSmmQaUEs5xyqYie+n+XFTd6k9LAZrgOrRS5QJ vGndrBq0GUVcNNNtflsB/brnoRKweZoFozgYlPEe2K17US0yVcJtubolfeOzruJidR jFIbO+L6JD/afKnIV/IMV52T5oE/0u9Tcc256hbnciahzkVURijzbYypqcQIFjVgWp /7cVkYyt8zwi/aG3pgXoPPJHs+7V93zDwnFdD3C0UdzVT9hNtI85/S7CyYvTey5eFO iMOGHlObjWWnZhwV643/OWATE6QmWAI1qBjTq2jYpka7q7BjBLpY8EM3ctZC9NsUtH R8Aq8O0yGZSkw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 69B8468ABD for ; Tue, 16 Dec 2025 19:27:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938468; bh=jGhYIbUVrtG+IWH479B9J1gEy2sLjEPnyie4eICKk8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KToKCRz6YCKIRTmS3EjLXkiJwpRP0aCuCejjGEDsnb/mSCpbhjIjAnU7bJlRHIJCb yBGYaWu7hgaSTrR/i8E4+bQwmsMUa9cMOz9+8TAa3a16CEO4wTqPivQQZ/o0wxBLia PSa284IZJETWn6qt7l+5vFwI0LMqEuj+hbEnn5tG+qsyyiWC9wdmLs8GBhGLwEmIUM yfKH3oqCpE3fTBunElGwmNj/apybEAv4jED8BID5ZvdeRL72JMGJcmi668FoDjQny9 3fA5wOY5TOmw3rrOLt0UbvOpVmwpLf6pPTAG5StC5IroTDsFAbGaVRJWS8B6+J9edw 8yveEjOAJdljw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5DF306884F; Tue, 16 Dec 2025 19:27:48 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id BO7EcOHQQ3_n; Tue, 16 Dec 2025 19:27:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1765938464; bh=MLEx3yPMRaCfZntagflSZb/bKzyVynYNFAOFiKCwkCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lZGXkQh/mInokUliYLSnyrxpCldJbU29+7YncSZy20Wr/4knc3DlxZG5jWD9nV+TC xXlUI5lUMyfPWrTOKf3483+yENvav5CeH4p052dkgAeSNKL7JCMFVkrAV5HPCZdtyx hisinlGKO3Terxr65d1QYhRDLYsjfExr/mEVi4c0BlQwK5NNwIhafSsqdbUVGMxsuz SO6McIycZshr5o9Cwez5BgMl/jEvlsqzEevYxMxkMfQmx4cqfrvw9kJnfvyRFsRwVD vcFvzlbEZsqNE1XDbrO59sasDYtvwz7fGgEoGh9hoHP88CfwlCyZc79PqtW2HqpACG 2HJCr/EyhbNLg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CA35C68ABD; Tue, 16 Dec 2025 19:27:43 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 16 Dec 2025 19:26:05 -0700 Message-ID: <20251217022611.389379-18-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251217022611.389379-1-sjg@u-boot.org> References: <20251217022611.389379-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: KLKELS4OAKKPGNCKXYTA2BW7XALDLE3Y X-Message-ID-Hash: KLKELS4OAKKPGNCKXYTA2BW7XALDLE3Y X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 17/17] pickman: Process review comments in step command List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Have the step command also process review comments when there are open MRs. This integrates the review functionality into step, so a single poll loop can handle the full workflow: process merged MRs, handle review comments, and create new MRs when ready. Refactor process_mr_reviews() as a helper function used by both do_review() and do_step(). Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- tools/pickman/README.rst | 18 +++++++++++++----- tools/pickman/control.py | 8 ++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/tools/pickman/README.rst b/tools/pickman/README.rst index 07b9408afa0..b469470138b 100644 --- a/tools/pickman/README.rst +++ b/tools/pickman/README.rst @@ -25,9 +25,15 @@ The typical workflow for using pickman is: 4. **Repeat**: Go back to step 2 until all commits are cherry-picked. -For automated workflows, use ``step`` instead of ``apply -p``. It checks for -open pickman MRs first and only creates a new one if none are pending. Use -``review`` to have the agent address MR comments. +For fully automated workflows, use ``poll`` which runs ``step`` in a loop. The +``step`` command handles the complete cycle automatically: + +- Detects merged MRs and updates the database (no manual ``commit-source``) +- Processes review comments on open MRs using Claude agent +- Creates new MRs when none are pending + +This allows hands-off operation: just run ``poll`` and approve/merge MRs in +GitLab as they come in. Usage ----- @@ -122,11 +128,13 @@ This command performs the following: 1. Checks for merged pickman MRs and updates the database with the last cherry-picked commit from each merged MR 2. Checks for open pickman MRs (those with ``[pickman]`` in the title) -3. If no open MRs exist, runs ``apply`` with ``--push`` to create a new one +3. If open MRs exist, processes any review comments using Claude agent +4. If no open MRs exist, runs ``apply`` with ``--push`` to create a new one This is useful for automated workflows where only one MR should be active at a time. The automatic database update on merge means you don't need to manually -run ``commit-source`` after each MR is merged. +run ``commit-source`` after each MR is merged, and review comments are handled +automatically. Options for the step command: diff --git a/tools/pickman/control.py b/tools/pickman/control.py index aaed06c1e35..86ecc5574e7 100644 --- a/tools/pickman/control.py +++ b/tools/pickman/control.py @@ -600,8 +600,8 @@ def do_step(args, dbs): """Create an MR if none is pending Checks for merged pickman MRs and updates the database, then checks for - open pickman MRs and if none exist, runs apply with push to create a new - one. + open pickman MRs. If open MRs exist, processes any review comments. If no + open MRs exist, runs apply with push to create a new one. Args: args (Namespace): Parsed arguments with 'source', 'remote', 'target' @@ -627,6 +627,10 @@ def do_step(args, dbs): tout.info(f'Found {len(mrs)} open pickman MR(s):') for merge_req in mrs: tout.info(f" !{merge_req['iid']}: {merge_req['title']}") + + # Process any review comments on open MRs + process_mr_reviews(remote, mrs) + tout.info('') tout.info('Not creating new MR while others are pending') return 0