From f84880fecbe1dc18ad81fea63953323979177880 Mon Sep 17 00:00:00 2001 From: LangLangBart <92653266+LangLangBart@users.noreply.github.com> Date: Tue, 16 Jul 2024 09:40:15 +0200 Subject: [PATCH] chore: move env variables up --- gh-notify | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/gh-notify b/gh-notify index 0eb38c4..6b43bcc 100755 --- a/gh-notify +++ b/gh-notify @@ -15,18 +15,6 @@ set -o errexit -o nounset -o pipefail # The minimum fzf version that the user needs to run all interactive commands. MIN_FZF_VERSION="0.29.0" - -# export variables for use in child processes -# https://docs.github.com/en/rest/overview/api-versions -export GH_REST_API_VERSION="X-GitHub-Api-Version:2022-11-28" -# Enable terminal-style output even when the output is redirected. -export GH_FORCE_TTY=1 - -# The maximum number of notifications per page (set by GitHub) -export GH_NOTIFY_PER_PAGE_LIMIT=50 -# Assign 'GH_NOTIFY_DEBUG_MODE' with 'true' to see more information -export GH_NOTIFY_DEBUG_MODE=${GH_NOTIFY_DEBUG_MODE:-false} - # Customize the fzf keys using environment variables : "${GH_NOTIFY_MARK_ALL_READ_KEY:=ctrl-a}" : "${GH_NOTIFY_OPEN_BROWSER_KEY:=ctrl-b}" @@ -40,6 +28,17 @@ export GH_NOTIFY_DEBUG_MODE=${GH_NOTIFY_DEBUG_MODE:-false} : "${GH_NOTIFY_TOGGLE_PREVIEW_KEY:=tab}" : "${GH_NOTIFY_TOGGLE_HELP_KEY:=?}" +# export variables for use in child processes +# https://docs.github.com/en/rest/overview/api-versions +export GH_REST_API_VERSION="X-GitHub-Api-Version:2022-11-28" +# Enable terminal-style output even when the output is redirected. +export GH_FORCE_TTY=1 + +# The maximum number of notifications per page (set by GitHub) +export GH_NOTIFY_PER_PAGE_LIMIT=50 +# Assign 'GH_NOTIFY_DEBUG_MODE' with 'true' to see more information +export GH_NOTIFY_DEBUG_MODE=${GH_NOTIFY_DEBUG_MODE:-false} + if $GH_NOTIFY_DEBUG_MODE; then export gh_notify_debug_log="${BASH_SOURCE%/*}/gh_notify_debug.log"