File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -118,16 +118,16 @@ Notify Slack's channel about recent push:
118
118
> EOF
119
119
` ` `
120
120
` ` `
121
- ~ $ webhook -secret secret123 slack.tsc
121
+ ~ $ SLACK_TOKEN=token SLACK_CHANNEL=channel123 webhook -secret secret123 slack.tsc
122
122
` ` `
123
123
Notify HipChat' s room about recent push:
124
124
```bash
125
- ~ $ cat >hipchat.tsc <<EOF
125
+ ~ $ cat >hipchat.tsc <<EOF
126
126
> {{with $e := .}}
127
- > {{if eq $e.name "push"}}
128
- > {{with $auth := (printf "authorization: bearer %s" (env "hipchat_token "))}}
129
- > {{with $msg := (printf "{\"message_format\": \"text\", \"message\": \"%s pushed to %s\"}" $e.payload.pusher.email $e.payload.repository.name )}}
130
- > {{with $url := (printf "https://api.hipchat.com/v2/room/%s/notification" (env "hipchat_room "))}}
127
+ > {{if eq $e.Name "push"}}
128
+ > {{with $auth := (printf "authorization: bearer %s" (env "HIPCHAT_TOKEN "))}}
129
+ > {{with $msg := (printf "{\"message_format\": \"text\", \"message\": \"%s pushed to %s\"}" $e.Payload.Pusher.Email $e.Payload.Repository.Name )}}
130
+ > {{with $url := (printf "https://api.hipchat.com/v2/room/%s/notification" (env "HIPCHAT_ROOM "))}}
131
131
> {{exec "curl" "-h" "content-type: application/json" "-h" $auth "-x" "post" "-d" $msg $url | log}}
132
132
> {{end}}
133
133
> {{end}}
@@ -137,7 +137,7 @@ Notify HipChat's room about recent push:
137
137
> EOF
138
138
```
139
139
```
140
- ~ $ webhook -secret secret123 hipchat.tsc
140
+ ~ $ HIPCHAT_TOKEN=token HIPCHAT_ROOM=123 webhook -secret secret123 hipchat.tsc
141
141
```
142
142
143
143
### Troubleshooting
You can’t perform that action at this time.
0 commit comments