repo created
This commit is contained in:
commit
1ef725ef20
2483 changed files with 278273 additions and 0 deletions
27
scripts/lib.sh
Normal file
27
scripts/lib.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-FileCopyrightText: 2022 Álvaro Brey <alvaro@alvarobrey.com>
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#
|
||||
|
||||
## This file is intended to be sourced by other scripts
|
||||
|
||||
|
||||
function err() {
|
||||
echo >&2 "$@"
|
||||
}
|
||||
|
||||
|
||||
function curl_gh() {
|
||||
if [[ -n "$GITHUB_TOKEN" ]]
|
||||
then
|
||||
curl \
|
||||
--silent \
|
||||
--header "Authorization: token $GITHUB_TOKEN" \
|
||||
"$@"
|
||||
else
|
||||
err "WARNING: No GITHUB_TOKEN found. Skipping API call"
|
||||
fi
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue