Skip to content

Commit

Permalink
chore: move env variables up
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart authored Jul 16, 2024
1 parent 5e7d30b commit f84880f
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions gh-notify
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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"

Expand Down

0 comments on commit f84880f

Please sign in to comment.