| Message ID | 20240706160725.3257906-2-hauke@hauke-m.de |
|---|---|
| State | Accepted |
| Delegated to: | Hauke Mehrtens |
| Headers | show
Return-Path:
<openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org>
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 <incoming@patchwork.ozlabs.org>; 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 <hauke@hauke-m.de>
To: openwrt-devel@lists.openwrt.org
Cc: ansuelsmth@gmail.com,
Hauke Mehrtens <hauke@hauke-m.de>
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 <hauke@hauke-m.de> ---
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 <openwrt-devel.lists.openwrt.org>
List-Unsubscribe: <https://lists.openwrt.org/mailman/options/openwrt-devel>,
<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>
List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/>
List-Post: <mailto:openwrt-devel@lists.openwrt.org>
List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help>
List-Subscribe: <https://lists.openwrt.org/mailman/listinfo/openwrt-devel>,
<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org>
Errors-To:
openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org
|
| Series |
github-merge-pr: Misc patches
|
expand
|
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
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 <hauke@hauke-m.de> --- github-merge-pr.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)