We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a428e4 commit 73bf998Copy full SHA for 73bf998
1 file changed
scripts/gitverse-ci.sh
@@ -13,9 +13,15 @@
13
set -euo pipefail
14
15
API="https://api.gitverse.ru"
16
-REPO="${GITVERSE_REPO:-lavr/express-botx}"
+# repo: $GITVERSE_REPO, or derived from the "gitverse" git remote of the current repo
17
+REPO="${GITVERSE_REPO:-$(git remote get-url gitverse 2>/dev/null | sed -E 's|.*gitverse\.ru[:/]||; s|\.git$||' || true)}"
18
TOKEN="${GITVERSE_TOKEN:-$(cat "$HOME/.gitverse_token" 2>/dev/null || true)}"
19
20
+if [[ -z "$REPO" ]]; then
21
+ echo "Error: set GITVERSE_REPO or run inside a repo with a 'gitverse' remote" >&2
22
+ exit 1
23
+fi
24
+
25
if [[ -z "$TOKEN" ]]; then
26
echo "Error: set GITVERSE_TOKEN or put token into ~/.gitverse_token" >&2
27
exit 1
0 commit comments