From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 513713896C23 for ; Thu, 10 Jun 2021 10:40:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 513713896C23 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-577-j8K1fN4ROiiUkLH2R_Ez9g-1; Thu, 10 Jun 2021 06:40:29 -0400 X-MC-Unique: j8K1fN4ROiiUkLH2R_Ez9g-1 Received: by mail-wr1-f69.google.com with SMTP id n4-20020a5d42040000b0290119fef97609so680262wrq.18 for ; Thu, 10 Jun 2021 03:40:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2OvjJZpkpYMvEhJBC0YHyBjWHjruRKUWkIrc3ShiBNg=; b=deFVJpRj7V4DyTrhAq8mLbaZiI8UOqOCfe08c7V4eKsinS44zAG1WfJlvwQpJFL7I2 WOPup7VeMp6Swu7rkB0HzmYB9NCI2YGCChcyQI1VkZGu1YOIyV7Z+NPKEz6UelSeVXUy VVEJQK/99+0eJYqbnPc7V+BzefNE14L9MLZiR7jMuc1ERTYto7KWQZSfaUomLPobvHgo cBzvuqNHVRmp1zQ5igXry1CJLU9OjMERVJWqe7tY2elR+0ek5R7GNitEmb+5EaL2XKZx zyLavznBvNZBQDUPxRVBhhA9bKhO1x/zGBvQSEFUrFrxn4imTfe4Bai0v4VlsA7b98uf 7MDw== X-Gm-Message-State: AOAM5326Kcx31T96nwjzUiDprghRVzztmUUYdgQb2EGHOwFOTRbK2+ns wOLGZrHaoVSLQwhddg8wHvZsueNBUOhAcyGtqZK+TFsTYgO155hMX6EaHgy0k/KonNC8xPcfQMq WyXaes+ioR3irifwVIVATwBg= X-Received: by 2002:adf:906a:: with SMTP id h97mr4682768wrh.311.1623321628813; Thu, 10 Jun 2021 03:40:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH0CwzqqPLyjOVNxZ/LIS4AetsLOWd5pSjT+SKm28+i0/P7nybHdkbR7uietG7SLy5AFF6rLKvTmmkwSxFP1I= X-Received: by 2002:adf:906a:: with SMTP id h97mr4682742wrh.311.1623321628600; Thu, 10 Jun 2021 03:40:28 -0700 (PDT) MIME-Version: 1.0 References: <36a4f5c4-357a-ca1c-e7f5-ede6ff3ba445@suse.cz> <20210610100851.GD7746@tucnak> In-Reply-To: <20210610100851.GD7746@tucnak> From: Jonathan Wakely Date: Thu, 10 Jun 2021 11:40:17 +0100 Message-ID: Subject: Re: git gcc-commit-mklog doesn't extract PR number to ChangeLog To: Jakub Jelinek Cc: mliska@suse.cz, gcc@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 10:40:32 -0000 On Thu, 10 Jun 2021 at 11:08, Jakub Jelinek wrote: > > On Thu, Jun 10, 2021 at 11:01:49AM +0100, Jonathan Wakely via Gcc wrote: > > On 10/06/21 10:44 +0100, Jonathan Wakely wrote: > > > > Quite interesting idea! Are you willing to prepare a patch for it? > > > > > > This works. > > > > And this works better, because it checks the PR in the title matches > > one in the changelog. > > > > I'll get something added to the tests and prep this for commit. > > Note, some commits fix more than one PR. Sometimes the subject lists > just one of them and the ChangeLog several, at other times people mention > [PRnnnnnn, PRnnnnnn] etc. in the subject. > I think checking that at least one changeLog PR line matches at least one PR > in the subject would be good enough. > > Your regex will not match [PR123456, PR123457] in subject, perhaps ok Yeah, that wouldn't get matched, so no checks would be done for the changelog body. Not ideal, but better than what we have no where nothing is checked at all. > initially, and if I read it will will be happy if at least one line matches > it. Yes, if the summary line has a single PR number, it must be present in the changelog body. Other PR numbers can also be in the body, and they aren't checked. But I've hit an issue trying to test it, because the testcases in contrib/gcc-changelog/test_patches.txt are in the form of emails, and the Subject: line from the emails is not passed to the GitInfo constructor, so isn't part of the message that gets checked. Martin, Shouldn't the GitEmail class extract the Subject: from the email header and use that as the first line passed to the GitInfo object?