This repository was archived by the owner on Apr 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ You can provide also other configuration options:
20
20
- * message* - Deploy message, default is ** Deployment to '{$host}' on * {$prod}* was successful\n({$releasePath})**
21
21
- * color* - Message color, default is ** green**
22
22
- * notify* - Notify, default is ** 0**
23
-
23
+ - * endpoint * - API endpoint, change this if you run your own hipchat instance, default is ** https://api.hipchat.com/v1/rooms/message **
24
24
25
25
``` php
26
26
// deploy.php
Original file line number Diff line number Diff line change 29
29
'color ' => 'green ' ,
30
30
'format ' => 'json ' ,
31
31
'notify ' => 0 ,
32
+ 'endpoint ' => 'https://api.hipchat.com/v1/rooms/message ' ,
32
33
];
33
34
34
35
$ config = array_merge ($ defaultConfig , $ config );
39
40
throw new \RuntimeException ("Please configure new hipchat: set('hipchat', array('auth_token' => 'xxx', 'room_id' => 'yyy')); " );
40
41
}
41
42
43
+ $ endpoint = $ config ['endpoint ' ];
44
+ unset($ config ['endpoint ' ]);
45
+
42
46
$ urlParams = [
43
47
'room_id ' => $ config ['room_id ' ],
44
48
'from ' => $ config ['from ' ],
49
53
'format ' => $ config ['format ' ],
50
54
];
51
55
52
- $ url = ' https://api.hipchat.com/v1/rooms/message ? ' . http_build_query ($ urlParams );
56
+ $ url = $ endpoint . ' ? ' . http_build_query ($ urlParams );
53
57
54
58
$ result = @file_get_contents ($ url );
55
59
You can’t perform that action at this time.
0 commit comments