From patchwork Sat Jul 6 16:07:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1957619 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=T/FLsN1T; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=aIqS2rPe; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WGb1N30F1z1xrH for ; Sun, 7 Jul 2024 02:09:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D+QywVPUrmuHE9xmMJ7yP1MZHBJ133N1AGcsJH7enNM=; b=T/FLsN1TccGI8K C7VBIpsrK/vGN/1QFFeqr/y6TvvmiNd0oL5sMR8a09AqmEWx42N9v2A/9jQP9TaLtj0F3fgOeeTh5 DJMFmYbx1rqPbPhKJPz7HF1h11kfiszHCFWrtKG0PmAHPR8PndAiWGXFFgI3xQ/9lPomxj4f+NqlK kQ68VGI6w2fjlnzWVlFDMYi/gl1u+Zi7dc+L6nt+ggpkdNGPwjEStx6PCKMtLeoQMmwBpiROXnhu/ Mr0d758dNBvKRd63pex+6gpnlXP0gT3ngdSv8kMj4jJEGIEqYPGzq6BCeaYEfl8d9gnIxEjOg+c3p vN3lSE6zve7NvxIWjMkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7xC-00000000R9Z-3dxX; Sat, 06 Jul 2024 16:08:02 +0000 Received: from mout-p-102.mailbox.org ([80.241.56.152]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7x4-00000000R6i-2HpY for openwrt-devel@lists.openwrt.org; Sat, 06 Jul 2024 16:07:57 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4WGZzP6PFzz9sc8; Sat, 6 Jul 2024 18:07:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1720282065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rZ/YR0INr/nz5GHgg4myY5RgDCgvquq1/S28ZpwErMQ=; b=aIqS2rPeTTBpmG1ADVem6pnjkA70U3Hs3/eJgPn12zp6FPCtl+vhk2ObCKrJqUvrbQlahv Q2jRejUw4nytrgS6Exgwuw7bEl4mR0uH/LWM1XtJ1wYVupslflJm1Qw3YEsWxFTLApASa7 KEmyKrN5k59A/HIkOVeUiYpTuSzwcNl/+HsR/1iMReDdXFqYYSxnsLrlDONjHN5ZKDmba0 vVkUbHNt5ilzBujKBVSzHJ3Z8R0wz/Fq3Dn1svmNRtrsVCjfXnpM/gIOGKihn57R8/r8aT MjSIkiU4CCwwioxlIyhEdwhRr1AZqUId4qCWYjHcdyy12SJYy8hr7PsZAa8Ljw== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: ansuelsmth@gmail.com, Hauke Mehrtens Subject: [maintainer-tools PATCH 1/4] github-merge-pr: Use GITHUB_TOKEN for API access Date: Sat, 6 Jul 2024 18:07:22 +0200 Message-ID: <20240706160725.3257906-2-hauke@hauke-m.de> In-Reply-To: <20240706160725.3257906-1-hauke@hauke-m.de> References: <20240706160725.3257906-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4WGZzP6PFzz9sc8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240706_090754_745544_8D1A14A7 X-CRM114-Status: UNSURE ( 6.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Use the GITHUB_TOKEN also for the public https://api.github.com accesses. Over some networks like public hotspots github is blocking unauthenticated access. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.152 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Use the GITHUB_TOKEN also for the public https://api.github.com accesses. Over some networks like public hotspots github is blocking unauthenticated access. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/github-merge-pr.sh b/github-merge-pr.sh index dd08a89..db49c92 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -77,7 +77,13 @@ if [ -z "$(git branch --list "$BRANCH")" ]; then exit 2 fi -if ! PR_INFO="$(curl -f -s "https://api.github.com/repos/$REPO/pulls/$PRID")"; then +if [ -n "$GITHUB_TOKEN" ]; then + CURL_CMD=" --user \"$GITHUB_TOKEN:x-oauth-basic\" " +else + CURL_CMD=" " +fi + +if ! PR_INFO="$(curl $CURL_CMD -f -s "https://api.github.com/repos/$REPO/pulls/$PRID")"; then echo "Failed fetch PR #$PRID info" >&2 exit 3 fi From patchwork Sat Jul 6 16:07:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1957618 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=sPtE7aIV; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=qjiC5YtG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WGb1N1GwNz1xr7 for ; Sun, 7 Jul 2024 02:09:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8u54LoCslcy4sNFeFE2lKHq20xPNZmiLGtiPApXyQys=; b=sPtE7aIVviuTox P+mNqyaLpEaSHLDzSNvkvN5BP89nzUNj1yvmlbbRaO3f6VdWNjp4yZIHyXDa8oqlSDfDCwV7Ca/5T jC6wK8GO7zoN67hto1QaBZcjEAy/1o5IDIZiW3C/RFodzt2s7u6YTVEdyKdoutMsY/Q9i5yAGX7UR or/fPuUANFrVBwLvDmLtJ8RhOtr1/bTKFsMAdFwIqD7DeAlaCe5EXoNJ/fHPfmltQD9BGv6gv9odt NfjcF9LxtCEgML3zaSVwzTFQbfPirx5ZpAOPNgCseaMpJT36X9w7LSnxTyi9HAF2HVmxBPKweMlXq NBnLWMGSsh5709/kWtYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7x7-00000000R8D-3Msa; Sat, 06 Jul 2024 16:07:57 +0000 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7x4-00000000R6e-0RuP for openwrt-devel@lists.openwrt.org; Sat, 06 Jul 2024 16:07:55 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4WGZzQ2kTnz9t3d; Sat, 6 Jul 2024 18:07:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1720282066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mOKcaM65LUpqmENxz+wlwNadc+iB7jyyojyLNjlsHMM=; b=qjiC5YtGD62GsPFb5C10ZlrirNvkdggdqe7hhyj+0u4OEz9fHa/4GclzZVypGs/pSE6Frs /8AKSYxOkjHxUa6ZT43XE4qLbTyOvCd34ZEsHShiag0lELE21nI4cIiiKzhk/ICq95mjM4 5qoKFabUFZuCoW/Q5DgV2wHhTqnkFKdwq8a7LFqpZQ3QOqx0D+z/nRN8uHpv9GX1L5S6Jp kDe+RSWtfuWnPi3xCoTPgD4vdklvxEHLwmFzZFhPJo5h2A8E6GUTaXMZkhhNx6cytFzWTA aod5X/p0cXUfW+1RqpF8ldOMsvkEfzPHfDwedPi98TQnxLJH8ftVhMQqlIBDmA== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: ansuelsmth@gmail.com, Hauke Mehrtens Subject: [maintainer-tools PATCH 2/4] github-merge-pr: Add option for no remote operations Date: Sat, 6 Jul 2024 18:07:23 +0200 Message-ID: <20240706160725.3257906-3-hauke@hauke-m.de> In-Reply-To: <20240706160725.3257906-1-hauke@hauke-m.de> References: <20240706160725.3257906-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240706_090754_313530_DADDEA70 X-CRM114-Status: UNSURE ( 6.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This adds the new option GITHUB_NO_PUSH which will prevent the script from doing any changes to remote repositories. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This adds the new option GITHUB_NO_PUSH which will prevent the script from doing any changes to remote repositories. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/github-merge-pr.sh b/github-merge-pr.sh index db49c92..76aec20 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -158,6 +158,21 @@ if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then exit 9 fi + if [ "$GITHUB_NO_PUSH" = "1" ]; then + echo "next commands:" + if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then + echo "$GIT push $PR_USER HEAD:$PR_BRANCH --force" + echo "$GIT checkout $BRANCH" + echo "$GIT merge --ff-only $PR_USER/$PR_BRANCH" + else + echo "$GIT checkout $BRANCH" + echo "$GIT merge --ff-only $LOCAL_PR_BRANCH" + fi + echo "$GIT push" + echo "$GIT branch -D $LOCAL_PR_BRANCH" + exit 20 + fi + echo "Force pushing $LOCAL_PR_BRANCH to HEAD:$PR_BRANCH for $PR_USER" if ! $GIT push $PR_USER HEAD:$PR_BRANCH --force; then echo "Failed to force push HEAD to $PR_USER" >&2 From patchwork Sat Jul 6 16:07:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1957617 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DUupBlah; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=FH/MxnAr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WGb1N1KDJz1xrF for ; Sun, 7 Jul 2024 02:09:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ss7k16knXO03rv5sM9eqaMnnRTpCJnOsv0MEyXz+YBw=; b=DUupBlahvJ2g+9 EsSqVbqjocXTLfAZXlU8n0vHwgyRQwcdoe0uxVWeM0iSLxVow9qo7vY1cTnQk/PDFSWEM06M2xGaX hIFSDanqn3iZsmyC7F/t59PdxyJrO3BZxjYfvJ0ckt0IQCqwg1exbf0rhPRAfCVZ4fcYDrpy+K2WR 3gXIb23iBfhkc3x4umHpzzOGbtxxYIOpHP+4+e6KCZSwXVLEwRzoB9i+iikuCk0TONzL5diPyv+lP S3G9bLRrnTqdihfjLFUsSKtYL5X7lM5njfOUpSr0JM92AaJO8pEn5vZVe+l/IYOXGwvkKkpp0piIl vsartyGgc1S9A6M9/dpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7xB-00000000R9E-2WT9; Sat, 06 Jul 2024 16:08:01 +0000 Received: from mout-p-101.mailbox.org ([80.241.56.151]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7x4-00000000R6j-3cmN for openwrt-devel@lists.openwrt.org; Sat, 06 Jul 2024 16:07:57 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4WGZzQ5G17z9sbg; Sat, 6 Jul 2024 18:07:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1720282066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QeX1uOOOxRqYqKgK3rzzYZCm5V6q92g8Pb8FIHb9yag=; b=FH/MxnArxXyX+npNhgX98Lq7sEndI+feMtaIxrcmt4D0qHt9VsssAZa38HxLJQTb2bJYhj d0pjETsJwg/9zfmOB4tH3NAiE7h+Pf2uXU3XkTfOo++4fNQzHSBk0hFTDuCPaPERExSKpz pRU47s7fTTDn+bJNWm1stjOn1d0S/SAI9lgo0FM1yRvWrO5K6w3DLNsK42haGUyszpygDq pToCfk8qM2fb5oS48mu3h93OuKBBeYdOHUxXhbnMP4q55DtccCm0F1sw3I6cRA5yn2VUgY PToe83XANZNPiBY+kwSKNJe6VGy/BVjELa4IKQhKhqSLaJyFeIwbiTpTcNN8ew== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: ansuelsmth@gmail.com, Hauke Mehrtens Subject: [maintainer-tools PATCH 3/4] github-merge-pr: Add option to ignore .mergeable Date: Sat, 6 Jul 2024 18:07:24 +0200 Message-ID: <20240706160725.3257906-4-hauke@hauke-m.de> In-Reply-To: <20240706160725.3257906-1-hauke@hauke-m.de> References: <20240706160725.3257906-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4WGZzQ5G17z9sbg X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240706_090755_126643_7D298F9D X-CRM114-Status: UNSURE ( 7.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The option IGNORE_MERGEABLE allows to ignore if the PR is mergeable. This allows to prepare PRs which can not be force pushed with this script. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.151 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The option IGNORE_MERGEABLE allows to ignore if the PR is mergeable. This allows to prepare PRs which can not be force pushed with this script. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-merge-pr.sh b/github-merge-pr.sh index 76aec20..f294c85 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -123,7 +123,7 @@ fi echo "Fetching remote $PR_USER" $GIT fetch $PR_USER $PR_BRANCH -if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ]; then +if [ "$(echo "$PR_INFO" | jq -r ".maintainer_can_modify")" == "true" ] || [ "$IGNORE_MERGEABLE" = "1" ]; then echo "Creating branch $LOCAL_PR_BRANCH for $PR_BRANCH" if ! $GIT checkout -b $LOCAL_PR_BRANCH $PR_USER/$PR_BRANCH; then echo "Failed to checkout new branch $PR_BRANCH from $PR_USER/$PR_BRANCH" >&2 From patchwork Sat Jul 6 16:07:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1957620 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zcZmW+tQ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=hauke-m.de header.i=@hauke-m.de header.a=rsa-sha256 header.s=MBO0001 header.b=vlQ33Qt/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WGb1N31tzz1xrJ for ; Sun, 7 Jul 2024 02:09:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=txOrpPe7t+vd09WM6FXhOFbhZXj7rzn/bE+h7eMKsO0=; b=zcZmW+tQ6BNMXp oMUdixEh0Foigt4Rg9jgETomFhAVFzOQyl6gQqRm79PoQn8Kn8pYlJQUCet4HejIb/i2rJgWXN5lD p+tPKrx3c3ufoYR7d9RmgcfFibLu26KxvpOVYKjH5J36KSsexybhkmI1hOYCAGhKM1cNd2QSDxoo5 v1L3166pSNX8dU3gNeOCckaavhXOx/zjZNKUWSj57kpdvfim4VLubMlEG8JYNWuOl0LL+xYnpWXZz 4Wz1kc1bFBBMRq0uziSGT8e+RQAl+QsxJBWqEeSFQSpLeyJ1bql080nV7r2oM/6NW5sR8kvF88PU+ SmHZRMPpNA5FCeaiAuJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7x9-00000000R8h-0ZWA; Sat, 06 Jul 2024 16:07:59 +0000 Received: from mout-p-201.mailbox.org ([80.241.56.171]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQ7x4-00000000R6f-0TGI for openwrt-devel@lists.openwrt.org; Sat, 06 Jul 2024 16:07:55 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4WGZzR1CXfz9tJh; Sat, 6 Jul 2024 18:07:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hauke-m.de; s=MBO0001; t=1720282067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RMac6Z65oYEaXuEiJLXb4u+iaBUhOl8u5WHdLDiQF0k=; b=vlQ33Qt/c19rkWO5WZtisTmg510zjoajfKKc0XpJ7QSkq1X7P9Pk82ACv1UROmp7pcI/vw fEDehqaoHiLu1Bcwfp4GqSYHCSk8jUyagnvi809mszaocCaYKJElJ0qNik+j4VjJrsDAjw DFoP411QY/vGAFa+JXf02QWifaUJZbH14n4fwsl5KpOct0N3P5YiWTGu7OWoLV2QkGpvz+ jl5BwZ7aHeH45zwHXuL6g36zk6fKGpr8Z2vdujtwrj9SfmrW7tBRpC1hDmVAuS3bpM2YnC 2TvjNCX08iSckdcPuXnzhe7eYInLZZHKXtPkqgrBv14WkjDyI2HLhbwkA9Aqpg== From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Cc: ansuelsmth@gmail.com, Hauke Mehrtens Subject: [maintainer-tools PATCH 4/4] github-merge-pr: doc: Install extra git-filter-repo Date: Sat, 6 Jul 2024 18:07:25 +0200 Message-ID: <20240706160725.3257906-5-hauke@hauke-m.de> In-Reply-To: <20240706160725.3257906-1-hauke@hauke-m.de> References: <20240706160725.3257906-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4WGZzR1CXfz9tJh X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240706_090754_313635_A3A75A14 X-CRM114-Status: UNSURE ( 6.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The git filter-repo command is not available by default. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github-merge-pr.sh b/github-merge-pr.sh index f294c85..1bd3e2f 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -6,6 +6,8 @@ # 2. Make sure you can correctly push and force pus [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The git filter-repo command is not available by default. Signed-off-by: Hauke Mehrtens --- github-merge-pr.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github-merge-pr.sh b/github-merge-pr.sh index f294c85..1bd3e2f 100755 --- a/github-merge-pr.sh +++ b/github-merge-pr.sh @@ -6,6 +6,8 @@ # 2. Make sure you can correctly push and force push to the github # repository # +# Make sure to install the extra git-filter-repo package. +# # Usage: github-merge-pr.sh PR_NUMBER BRANCH REPO_NAME # # BRANCH is optional and defaults to main.