Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
d8a4e47a
Unverified
Commit
d8a4e47a
authored
Jul 18, 2022
by
Grigory Starinkin
Browse files
disable "$response is referenced but not assigned" warning
the variable is assigned by the `_post` call
parent
bc920949
Changes
1
Show whitespace changes
Inline
Side-by-side
notify/slack_app.sh
View file @
d8a4e47a
...
@@ -32,6 +32,7 @@ slack_app_send() {
...
@@ -32,6 +32,7 @@ slack_app_send() {
SLACK_APP_API_URL
=
"https://slack.com/api/chat.postMessage"
SLACK_APP_API_URL
=
"https://slack.com/api/chat.postMessage"
if
_post
"
$_data
"
"
$SLACK_APP_API_URL
"
""
"POST"
"application/json; charset=utf-8"
;
then
if
_post
"
$_data
"
"
$SLACK_APP_API_URL
"
""
"POST"
"application/json; charset=utf-8"
;
then
# shellcheck disable=SC2154
SLACK_APP_RESULT_OK
=
$(
echo
"
$response
"
| _egrep_o
'ok" *: *true'
)
SLACK_APP_RESULT_OK
=
$(
echo
"
$response
"
| _egrep_o
'ok" *: *true'
)
if
[
"
$?
"
=
"0"
]
&&
[
"
$SLACK_APP_RESULT_OK
"
]
;
then
if
[
"
$?
"
=
"0"
]
&&
[
"
$SLACK_APP_RESULT_OK
"
]
;
then
_info
"slack send success."
_info
"slack send success."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment