We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff37759 commit 25e0566Copy full SHA for 25e0566
scripts/lib.sh
@@ -0,0 +1,27 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Nextcloud Android Library
4
+# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
5
+# SPDX-FileCopyrightText: 2022 Álvaro Brey <[email protected]>
6
+# SPDX-License-Identifier: MIT
7
+
8
+## This file is intended to be sourced by other scripts
9
10
11
+function err() {
12
+ echo >&2 "$@"
13
+}
14
15
16
+function curl_gh() {
17
+ if [[ -n "$GITHUB_TOKEN" ]]
18
+ then
19
+ curl \
20
+ --silent \
21
+ --header "Authorization: token $GITHUB_TOKEN" \
22
+ "$@"
23
+ else
24
+ err "WARNING: No GITHUB_TOKEN found. Skipping API call"
25
+ fi
26
27
0 commit comments