From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1695416360; bh=dtpq0V+8ujla2mAqfj38LRC1CwYF3MBoE5c7lL/PIjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UmPPsPWutLj0YCa80/E5sL4xsHL1b4kePgUaVeu/Cz8B60e6T+KxZp+7pT6PwvnIa GyoYb4iTaZ5cQIjWFuXkeR8yYIJ93GAVFwdDife0MyUuYsH539cRzMoPBX7evPEXGW Iz/s9fsCfWkNjpm3F1Y+iHCEcGceCH6/XBRMnzvD+aVdhbj4/OhpmqcS6weOStnXXt 4BUgVffmyOed5jGnNAtIFVQpzPnRPhzqlx4R6anLi+42MKzUbudEYgx7vBcogl9kBv kY1ieEz3PUxECF9RTJlk8oZFq4tafwFPDkef2XhydMRnGGE/kBHv2Yg8PHtl/31ywd vPcg8tgI8z+Zg== Received: from localhost.localdomain (unknown [175.158.50.129]) by gnuweeb.org (Postfix) with ESMTPSA id C858724B68D; Sat, 23 Sep 2023 03:59:17 +0700 (WIB) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , Arthur Lapz , Memet Zx , GNU/Weeb Mailing List Subject: [PATCH v1 07/11] feat(page): add `getOrgMembers()` function Date: Sat, 23 Sep 2023 03:58:13 +0700 Message-Id: <20230922205817.107-8-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20230922205817.107-1-kiizuha@gnuweeb.org> References: <20230922205817.107-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This commit adds the `getOrgMembers()` function, which is responsible for retrieving the list of organization members. This function will be called for the next commit. Signed-off-by: Muhammad Rizki --- index.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/index.html b/index.html index 40f8a9e..26e4043 100644 --- a/index.html +++ b/index.html @@ -294,6 +294,21 @@ copyText.classList.remove("bg-neutral-800"); }, 3000); } + + async function getOrgMembers() { + const response = await fetch("https://api.github.com/orgs/gnuweeb/members"); + const data = await response.json(); + + data.sort((left, right) => { + const usernameA = left.login.toLowerCase(); + const usernameB = right.login.toLowerCase(); + if (usernameA < usernameB) return -1; + if (usernameA > usernameB) return 1; + return 0; + }); + + return data; + } -- Muhammad Rizki