Skip to content

Commit

Permalink
Merge pull request #17 from sargsyan/fix-ghe-url
Browse files Browse the repository at this point in the history
Fix ghe url
  • Loading branch information
sargsyan authored Dec 11, 2019
2 parents 2a67538 + 99fcf78 commit cdf0546
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion github_notif
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ function main() {
local notifications_json
access_token=$(get_token "$config_name")

local notifications_api_url="${config_name/https:\/\//https://api.}"/notifications
local notifications_api_url
if [[ "$config_name" == "https://github.com" ]]; then
notifications_api_url="${config_name/https:\/\//https://api.}"/notifications
else
notifications_api_url="${config_name}/api/v3/notifications"
fi

notifications_json=$(do_github_remote_call "$notifications_api_url" "$access_token")
local call_result=$?
if [[ $call_result -ne 0 ]]; then
Expand Down

0 comments on commit cdf0546

Please sign in to comment.