Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/rapids-get-pr-conda-artifact-github
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@
set -euo pipefail
export RAPIDS_SCRIPT_NAME="rapids-get-pr-conda-artifact-github"

source rapids-prompt-local-github-auth

_rapids-get-pr-artifact-github "${1}" "${2}" "${3}" conda "${4:-}"
24 changes: 20 additions & 4 deletions tools/rapids-prompt-local-github-auth
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@
# A utility script that prompts user to authenticate with GitHub in
# local environments

if [ -z "${GH_TOKEN:-}" ] && [ -z "${GITHUB_TOKEN:-}" ]; then
rapids-echo-stderr "No GitHub token detected in environment"
rapids-echo-stderr "Please authenticate with GitHub to continue"
gh auth login --web --git-protocol https
#!/bin/bash
# A utility script that prompts user to authenticate with GitHub in
# local environments

declare -a scopes=("repo" "workflow")

# shellcheck disable=SC2068
if ! gh auth status >/dev/null 2>&1; then
rapids-echo-stderr "No GitHub authentication detected"
rapids-echo-stderr "Please authenticate with GitHub to continue"

# Attempt authentication
if ! gh auth login \
--web --git-protocol https \
--hostname "github.com" \
${scopes[@]/#/--scopes }; then

rapids-echo-stderr "GitHub authentication failed. Exiting."
exit 1
fi
fi
1 change: 1 addition & 0 deletions tools/rapids-upload-to-anaconda-github
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
set -euo pipefail
export RAPIDS_SCRIPT_NAME="rapids-upload-to-anaconda-github"

source rapids-prompt-local-github-auth
case "${RAPIDS_BUILD_TYPE}" in
branch)
;&
Expand Down
2 changes: 2 additions & 0 deletions tools/rapids-wheels-anaconda-github
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
set -eou pipefail
export RAPIDS_SCRIPT_NAME="rapids-wheels-anaconda-github"

source rapids-prompt-local-github-auth

if [ -z "$1" ]; then
rapids-echo-stderr "Must specify input arguments: WHEEL_NAME"
exit 1
Expand Down