List of commits:
Subject Hash Author Date (UTC)
When adding hooks, help the user by providing some defaults (slack for now) a7f4d8f10f8943508d90e968129b412431a4b0c3 Catalin(ux) M. BOIE 2016-01-30 17:37:50
Store good key string into the database. 460245b306d9e7340969b386eecaaa6cfc7f7431 Catalin(ux) M. BOIE 2016-01-29 18:23:12
Some small fixes for http hooks 43f8db273aedd804b150ee07a1af23b347687975 Catalin(ux) M. BOIE 2016-01-29 18:22:32
Bump version 37e96e0960414a11682c3fc1344e896c93492123 Catalin(ux) M. BOIE 2016-01-25 21:28:45
Remove debug leftover f39db0548ef78c2265d675a4199c9c26d53807b3 Catalin(ux) M. BOIE 2016-01-25 21:27:33
Fixed bad interaction between fixes and structure fc0fabf8d429a18978908694bc9a86d09bed702b Catalin(ux) M. BOIE 2016-01-25 21:27:13
Do not allow a failed connection to generate err-* file 5cf7214e724427ef78a1e8d72eef1be865c2270a Catalin(ux) M. BOIE 2016-01-20 22:56:56
Log the id of the event 115138b15e0436b56b7f75f12e5cf0d068989dea Catalin(ux) M. BOIE 2016-01-20 19:28:53
If git ls-tree returns nothing, the path is invalid a96013c19fae04a9ec0ec3b1505825c92150c978 Catalin(ux) M. BOIE 2016-01-20 19:14:03
bump version to 0.47 a71ef807917abc1adf19e2416e2d095f1d8dee7e Catalin(ux) M. BOIE 2016-01-17 19:38:40
Hooks fixes fa2a07bd822b496e65cee7c748429e9b69e91707 Catalin(ux) M. BOIE 2016-01-17 19:26:37
Mostly Amazon CodeDeploy and Lambda, and maked the plugins more generic 85a7d584e031f9b3ce94e2520f998ec6698ca46a Catalin(ux) M. BOIE 2016-01-15 20:14:20
Minor stuff d4d5f86741ca0a3c658879b82ec43877ceb0901b Catalin(ux) M. BOIE 2016-01-05 20:08:15
When we add a repo, we have some variables that are not filled f9b52eec5cd0decb886f87007a3d0a9826265a3a Catalin(ux) M. BOIE 2016-01-05 20:07:48
Small changes all over the place; first version with docker 657c8c4be46ae950d519320d1d54aa2f65a577d6 Catalin(ux) M. BOIE 2016-01-05 17:09:04
Cannot use env vars from cron 9c3b7123869564217493ab43c4bafdea2ce15702 Catalin(ux) M. BOIE 2016-01-03 08:45:51
Bump version to 0.44 bb334f3f3ec2af94da578b6c2e9202b339f80f36 Catalin(ux) M. BOIE 2016-01-02 23:25:39
Minor changes all over the place. 66c13a18b41d19e41e48aac537b735963bbb1f5a Catalin(ux) M. BOIE 2016-01-02 23:03:15
Set a timezone if is not set globally 0fb57c1d20aebfaaa6c1c48125b39aa8d7765923 Catalin(ux) M. BOIE 2016-01-02 21:09:41
If SELinux is not enabled, do not check the label 6a4a54c986eae48b6dfb56c33b5ac4498935669e Catalin(ux) M. BOIE 2016-01-02 09:13:32
Commit a7f4d8f10f8943508d90e968129b412431a4b0c3 - When adding hooks, help the user by providing some defaults (slack for now)
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-01-30 17:37
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-01-30 17:37
Parent(s): 460245b306d9e7340969b386eecaaa6cfc7f7431
Signer:
Signing key:
Signing status: N
Tree: ea1a8e8e0fb970c8143ce1b0d787c966b5cff6ee
File Lines added Lines deleted
inc/webhooks.inc.php 1 0
inc/wh/core.inc.php 21 3
inc/wh/http.inc.php 15 0
inc/wh/lambda.inc.php 3 0
root/themes/default/user/settings/wh/hints_tags.html 3 3
root/themes/default/user/settings/wh/plugins_list/header.html 1 1
root/themes/default/user/settings/wh/plugins_list/line.html 1 1
root/themes/default/user/settings/wh/subtype.html 1 0
File inc/webhooks.inc.php changed (mode: 100644) (index 3f2155c..20c6972)
... ... function rg_wh_add_high_level($db, $rg, $op, $paras)
110 110
111 111 if (strcmp($op, 'add') == 0) { if (strcmp($op, 'add') == 0) {
112 112 $rg['wh']['htype'] = array_shift($paras); $rg['wh']['htype'] = array_shift($paras);
113 $rg['wh']['hsubtype'] = array_shift($paras);
113 114 $rg['wh']['id'] = 0; $rg['wh']['id'] = 0;
114 115
115 116 if (!rg_wh_valid($rg['wh']['htype'])) if (!rg_wh_valid($rg['wh']['htype']))
File inc/wh/core.inc.php changed (mode: 100644) (index b709e90..718ff0f)
... ... function rg_wh_htypes($rg)
571 571 { {
572 572 global $rg_wh_plugins; global $rg_wh_plugins;
573 573
574 asort($rg_wh_plugins);
574 foreach ($rg_wh_plugins as $htype => &$pi) {
575 if (!isset($pi['subtypes']))
576 $pi['subtypes'] = array();
577
578 $list = array_merge($pi['subtypes'],
579 array('generic' => 'Generic'));
580
581 $pi['HTML:hsubtype_list'] = '';
582 $add = '';
583 foreach ($list as $st => $info) {
584 $a = array(
585 'htype' => $htype,
586 'hsubtype' => $st,
587 'info' => $info
588 );
589 $pi['HTML:hsubtype_list'] .= $add
590 . rg_template('user/settings/wh/subtype.html', $a, TRUE /*xss*/);
591 $add = ', ';
592 }
593 }
575 594
595 asort($rg_wh_plugins);
576 596 return rg_template_table('user/settings/wh/plugins_list', return rg_template_table('user/settings/wh/plugins_list',
577 597 $rg_wh_plugins, $rg); $rg_wh_plugins, $rg);
578 598 } }
 
... ... function rg_wh_valid($htype)
592 612 */ */
593 613 function rg_wh_replace_tags(&$ev) function rg_wh_replace_tags(&$ev)
594 614 { {
595 global $_SERVER;
596
597 615 rg_log_ml('wh_replace_tags: ev=' . print_r($ev, TRUE)); rg_log_ml('wh_replace_tags: ev=' . print_r($ev, TRUE));
598 616
599 617 $wh = &$ev['wh']; $wh = &$ev['wh'];
File inc/wh/http.inc.php changed (mode: 100644) (index 924463c..d2812f1)
... ... function rg_wh_http_default_paras(&$rg)
369 369 $a['opaque'] = ''; $a['opaque'] = '';
370 370 $a['key'] = ''; $a['key'] = '';
371 371 $a['custom_body'] = ''; $a['custom_body'] = '';
372
373 if (strcmp($rg['wh']['hsubtype'], 'slack') == 0) {
374 $rg['wh']['itype'] = 2;
375 $rg['wh']['description'] = 'Slack integration';
376 $a['events'] = 'P';
377 $a['custom_body'] = '{' . "\n"
378 . '"channel": "#rocketgit-##branch##",' . "\n"
379 . '"username": "RocketGit robot (hook ##hook_id##)",' . "\n"
380 . '"text": "Repo ##repo##, branch ##branch## pushed: <##commit_url##>",' . "\n"
381 . '"icon_emoji": ":ghost:"' . "\n"
382 . '}';
383 }
372 384 } }
373 385
374 386
 
... ... $rg_wh_plugins['http'] = array(
383 395 'default_paras' => 'rg_wh_http_default_paras', 'default_paras' => 'rg_wh_http_default_paras',
384 396 'fill_hints' => 'rg_wh_http_fill_hints', 'fill_hints' => 'rg_wh_http_fill_hints',
385 397 'have_events' => TRUE, 'have_events' => TRUE,
398 'subtypes' => array(
399 'slack' => 'Slack'
400 ),
386 401 'flags' => array( 'flags' => array(
387 402 'I' => 'Do not verify the server certificate', 'I' => 'Do not verify the server certificate',
388 403 'H' => 'Do not verify the server hostname' 'H' => 'Do not verify the server hostname'
File inc/wh/lambda.inc.php changed (mode: 100644) (index 856a08d..009b0b8)
... ... function rg_wh_lambda_default_paras(&$rg)
180 180 $a['function'] = ''; $a['function'] = '';
181 181 $a['payload'] = '{' . "\n" $a['payload'] = '{' . "\n"
182 182 . '"repo": "##repo##",' . "\n" . '"repo": "##repo##",' . "\n"
183 . '"repo_url": "##repo_url##",' . "\n"
183 184 . '"branch": "##branch##",' . "\n" . '"branch": "##branch##",' . "\n"
184 185 . '"hook_id": "##hook_id##",' . "\n" . '"hook_id": "##hook_id##",' . "\n"
185 186 . '"commit": "##commit##",' . "\n" . '"commit": "##commit##",' . "\n"
187 . '"commit_url": "##commit_url##",' . "\n"
186 188 . '"date": "##date##",' . "\n" . '"date": "##date##",' . "\n"
187 189 . '"time": "##time##",' . "\n" . '"time": "##time##",' . "\n"
188 190 . '"timestamp": "##timestamp##",' . "\n" . '"timestamp": "##timestamp##",' . "\n"
189 191 . '"ip": "##ip##"' . "\n" . '"ip": "##ip##"' . "\n"
190 192 . '}'; . '}';
193 $a['events'] = 'P';
191 194 } }
192 195
193 196
File root/themes/default/user/settings/wh/hints_tags.html changed (mode: 100644) (index 3088086..c4db4ba)
... ... be replaced at hook execution. It is a feature that allows you to minimize
4 4 the number of hooks you must maintain.<br /> the number of hooks you must maintain.<br />
5 5 The complete list of tags: The complete list of tags:
6 6 <ul> <ul>
7 <li>##repo## - the repository name</li>
7 8 <li>##repo_url## - the URL of the project</li> <li>##repo_url## - the URL of the project</li>
9 <li>##commit## - the git's SHA-1 commit id</li>
8 10 <li>##commit_url## - the URL of the last commit</li> <li>##commit_url## - the URL of the last commit</li>
9 <li>##repo## - the repository name</li>
10 11 <li>##branch## - the branch name just created or pushed to</li> <li>##branch## - the branch name just created or pushed to</li>
11 <li>##hook_id## - the id of the hook</li>
12 <li>##commit## - the git's SHA-1 commit id</li>
13 12 <li>##date## - the UTC date (example: 2016-01-15)</li> <li>##date## - the UTC date (example: 2016-01-15)</li>
14 13 <li>##time## - the UTC time (example: 00:36:23)</li> <li>##time## - the UTC time (example: 00:36:23)</li>
15 14 <li>##timestamp## - the UNIX epoch (example: 1452810114)</li> <li>##timestamp## - the UNIX epoch (example: 1452810114)</li>
16 15 <li>##ip## - the IP address from where the push took place</li> <li>##ip## - the IP address from where the push took place</li>
16 <li>##hook_id## - the id of the hook</li>
17 17 </ul> </ul>
File root/themes/default/user/settings/wh/plugins_list/header.html changed (mode: 100644) (index 7b2add5..c46b917)
1 1 <div class="wh_plugins_list"> <div class="wh_plugins_list">
2 2
3 Please choose one of the following plugin types:
3 Please choose one of the following hook types:
4 4 <table summary="webhooks types"> <table summary="webhooks types">
5 5 <tr> <tr>
6 6 <th>Name</th> <th>Name</th>
File root/themes/default/user/settings/wh/plugins_list/line.html changed (mode: 100644) (index 09ac4ab..4773de7)
1 1 <tr> <tr>
2 2 <td>@@htype@@</td> <td>@@htype@@</td>
3 3 <td>@@description@@</td> <td>@@description@@</td>
4 <td><a href="/op/settings/wh/add/@@htype@@">Add</a></td>
4 <td>@@hsubtype_list@@</td>
5 5 </tr> </tr>
File root/themes/default/user/settings/wh/subtype.html added (mode: 100644) (index 0000000..71f574e)
1 <a href="/op/settings/wh/add/@@htype@@/@@hsubtype@@">@@info@@</a>
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main