List of commits:
Subject Hash Author Date (UTC)
Added bug template and prefill the bug form assigned to field to the owner of the repo 682e787ceb92d770e1a268a9f635e4336102cf3b Catalin(ux) M. BOIE 2016-02-07 05:38:58
Change download location for rocketgit.xml 41bf40104994391fd5d9938ac891157625872c0d Catalin(ux) M. BOIE 2016-02-02 23:04:53
Fixes for data encoding for slack 67b8210aa1c86b891d6760c89ac840f38f4eb025 Catalin(ux) M. BOIE 2016-01-30 17:49:57
Some TODO updates and some minor text fixes d4a5bc8e8bc37021ca2c30899c01d8c54d56e5f6 Catalin(ux) M. BOIE 2016-01-30 17:38:59
Some docker fixes 36c31d723d45a067980217b1c642f6bb77d54fd9 Catalin(ux) M. BOIE 2016-01-30 17:38:25
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
Commit 682e787ceb92d770e1a268a9f635e4336102cf3b - Added bug template and prefill the bug form assigned to field to the owner of the repo
Author: Catalin(ux) M. BOIE
Author date (UTC): 2016-02-07 05:38
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2016-02-07 05:38
Parent(s): 41bf40104994391fd5d9938ac891157625872c0d
Signer:
Signing key:
Signing status: N
Tree: 22dfb3abb6f2150d170c11b15d9bfe804ef91571
File Lines added Lines deleted
docker/Dockerfile-rocketgit.tmpl 0 0
inc/bug.inc.php 12 13
inc/repo.inc.php 21 12
inc/struct.inc.php 5 0
root/themes/default/repo/add_edit.html 5 0
tests/helpers.inc.php 1 0
File docker/Dockerfile-rocketgit.tmpl renamed from docker/Dockerfile (similarity 100%)
File inc/bug.inc.php changed (mode: 100644) (index cf542d0..a2cc515)
... ... function rg_bug_next_id($db, $repo_id)
260 260 /* /*
261 261 * Helper for loading default values for a bug. * Helper for loading default values for a bug.
262 262 */ */
263 function rg_bug_vars_defaults()
263 function rg_bug_vars_defaults($rg)
264 264 { {
265 265 $ret = array(); $ret = array();
266 266 $ret['bug_id'] = 0; $ret['bug_id'] = 0;
267 $ret['title'] = "";
268 $ret['body'] = "";
267 $ret['title'] = '';
268 $ret['body'] = $rg['ri']['template'];
269 269 $ret['state'] = 1; $ret['state'] = 1;
270 $ret['labels'] = "";
271 $ret['assigned_to'] = "";
270 $ret['labels'] = '';
271 $ret['assigned_to'] = $rg['page_ui']['username'];
272 272
273 273 return $ret; return $ret;
274 274 } }
 
... ... function rg_bug_vars_defaults()
279 279 function rg_bug_vars() function rg_bug_vars()
280 280 { {
281 281 $ret = array(); $ret = array();
282 $ret['title'] = trim(rg_var_str("title"));
283 $ret['body'] = trim(rg_var_str("body"));
284 $ret['state'] = rg_var_uint("state");
285 $ret['labels'] = rg_var_str("labels");
286 $ret['assigned_to'] = rg_var_str("assigned_to");
282 $ret['title'] = trim(rg_var_str('title'));
283 $ret['body'] = trim(rg_var_str('body'));
284 $ret['state'] = rg_var_uint('state');
285 $ret['labels'] = trim(rg_var_str('labels'));
286 $ret['assigned_to'] = trim(rg_var_str('assigned_to'));
287 287
288 288 return $ret; return $ret;
289 289 } }
 
... ... function rg_bug_edit_high_level($db, &$rg)
1295 1295
1296 1296 if ($rg['doit'] == 0) { if ($rg['doit'] == 0) {
1297 1297 if ($rg['bug']['bug_id'] == 0) if ($rg['bug']['bug_id'] == 0)
1298 $rg['bug'] = rg_bug_vars_defaults();
1298 $rg['bug'] = rg_bug_vars_defaults($rg);
1299 1299 break; break;
1300 1300 } }
1301 1301
 
... ... function rg_bug_edit_high_level($db, &$rg)
1319 1319 } }
1320 1320 $rg['bug']['bug_id'] = $bug_id; $rg['bug']['bug_id'] = $bug_id;
1321 1321
1322 $url = rg_re_bugpage($rg['page_ui'],
1323 $rg['ri']['name'], $bug_id);
1322 $url = rg_re_bugpage($rg['page_ui'], $rg['ri']['name'], $bug_id);
1324 1323 rg_redirect($url); rg_redirect($url);
1325 1324
1326 1325 $show_form = FALSE; $show_form = FALSE;
File inc/repo.inc.php changed (mode: 100644) (index 6065689..19c3317)
... ... function rg_repo_path_by_name($uid, $repo_name)
801 801 */ */
802 802 function rg_repo_cosmetic($db, &$row) function rg_repo_cosmetic($db, &$row)
803 803 { {
804 // Because this field was added later and the cache may not have it
805 if (!isset($row['template']))
806 $row['template'] = '';
807
804 808 if (strlen(substr($row['description'], 0, 1)) == 1) { if (strlen(substr($row['description'], 0, 1)) == 1) {
805 $_a = rg_xss_safe(trim($row['description']));
809 $_a = rg_xss_safe($row['description']);
806 810 $row['HTML:description_nlbr'] = nl2br($_a); $row['HTML:description_nlbr'] = nl2br($_a);
807 811 } else { } else {
808 812 $row['HTML:description_nlbr'] = 'n/a'; $row['HTML:description_nlbr'] = 'n/a';
 
... ... function rg_repo_edit($db, $login_ui, &$new)
1047 1051 //TODO: master may be not accessible to this user. check. //TODO: master may be not accessible to this user. check.
1048 1052
1049 1053 // Small fixes // Small fixes
1050 $new['description'] = trim($new['description']);
1051 1054 $new['itime'] = time(); $new['itime'] = time();
1052 1055 $new['uid'] = $login_ui['uid']; $new['uid'] = $login_ui['uid'];
1053 1056
 
... ... function rg_repo_edit($db, $login_ui, &$new)
1059 1062
1060 1063 $sql = "INSERT INTO repos (uid, master, name" $sql = "INSERT INTO repos (uid, master, name"
1061 1064 . ", itime, max_commit_size, description" . ", itime, max_commit_size, description"
1062 . ", git_dir_done, public, license)"
1065 . ", git_dir_done, public, license, template)"
1063 1066 . " VALUES (@@uid@@, @@master@@, @@name@@" . " VALUES (@@uid@@, @@master@@, @@name@@"
1064 1067 . ", @@itime@@, @@max_commit_size@@" . ", @@itime@@, @@max_commit_size@@"
1065 1068 . ", @@description@@, 0, @@public@@" . ", @@description@@, 0, @@public@@"
1066 . ", @@license@@)"
1069 . ", @@license@@, @@template@@)"
1067 1070 . " RETURNING repo_id"; . " RETURNING repo_id";
1068 1071 } else { } else {
1069 1072 $sql = "UPDATE repos SET name = @@name@@" $sql = "UPDATE repos SET name = @@name@@"
 
... ... function rg_repo_edit($db, $login_ui, &$new)
1071 1074 . ", description = @@description@@" . ", description = @@description@@"
1072 1075 . ", public = @@public@@" . ", public = @@public@@"
1073 1076 . ", license = @@license@@" . ", license = @@license@@"
1077 . ", template = @@template@@"
1074 1078 . " WHERE repo_id = @@repo_id@@"; . " WHERE repo_id = @@repo_id@@";
1075 1079 } }
1076 1080 $res = rg_sql_query_params($db, $sql, $new); $res = rg_sql_query_params($db, $sql, $new);
 
... ... function rg_repo_edit_high_level($db, &$rg)
1765 1769 if (!$edit) { if (!$edit) {
1766 1770 // Defaults // Defaults
1767 1771 $rg['ri'] = array(); $rg['ri'] = array();
1768 $rg['ri']['repo_id'] = "0";
1769 $rg['ri']['master'] = "0";
1770 $rg['ri']['name'] = "";
1771 $rg['ri']['max_commit_size'] = "0";
1772 $rg['ri']['description'] = "";
1773 $rg['ri']['public'] = "1";
1774 $rg['ri']['license'] = "";
1772 $rg['ri']['repo_id'] = '0';
1773 $rg['ri']['master'] = '0';
1774 $rg['ri']['name'] = '';
1775 $rg['ri']['max_commit_size'] = '0';
1776 $rg['ri']['description'] = '';
1777 $rg['ri']['public'] = '1';
1778 $rg['ri']['license'] = '';
1779 $rg['ri']['template'] =
1780 'OS type(s) and version(s)?' . "\n\n"
1781 . 'Application version(s) affected?' . "\n\n"
1782 . 'Steps to reproduce?';
1775 1783 } }
1776 1784 break; break;
1777 1785 } }
1778 1786
1779 1787 $rg['ri']['repo_id'] = rg_var_uint('repo_id'); $rg['ri']['repo_id'] = rg_var_uint('repo_id');
1780 1788 $rg['ri']['master'] = rg_var_uint('master'); $rg['ri']['master'] = rg_var_uint('master');
1781 $rg['ri']['name'] = rg_var_str('name'); // TODO: filter name!
1789 $rg['ri']['name'] = trim(rg_var_str('name')); // TODO: filter name!
1782 1790 $rg['ri']['max_commit_size'] = rg_var_uint('max_commit_size'); $rg['ri']['max_commit_size'] = rg_var_uint('max_commit_size');
1783 1791 $rg['ri']['description'] = trim(rg_var_str('description')); $rg['ri']['description'] = trim(rg_var_str('description'));
1784 1792 $rg['ri']['public'] = rg_var_bool('public'); $rg['ri']['public'] = rg_var_bool('public');
1785 1793 $rg['ri']['license'] = trim(rg_var_str('license')); $rg['ri']['license'] = trim(rg_var_str('license'));
1794 $rg['ri']['template'] = trim(rg_var_str('template'));
1786 1795 rg_repo_cosmetic($db, $rg['ri']); rg_repo_cosmetic($db, $rg['ri']);
1787 1796 //rg_log_ml("CHECK: after repo edit: rg[ri]=" . print_r($rg['ri'], TRUE)); //rg_log_ml("CHECK: after repo edit: rg[ri]=" . print_r($rg['ri'], TRUE));
1788 1797
File inc/struct.inc.php changed (mode: 100644) (index 7c011e1..03e60c6)
... ... $rg_sql_struct[37]['other'] = array(
515 515 "ALTER TABLE webhooks ADD repo TEXT NOT NULL DEFAULT '';" "ALTER TABLE webhooks ADD repo TEXT NOT NULL DEFAULT '';"
516 516 ); );
517 517
518 $rg_sql_struct[38]['other'] = array(
519 'repo - template' =>
520 "ALTER TABLE repos ADD template TEXT NOT NULL DEFAULT ''"
521 );
522
518 523
519 524 // This must be the last line // This must be the last line
520 525 $rg_sql_schema_ver = count($rg_sql_struct); $rg_sql_schema_ver = count($rg_sql_struct);
File root/themes/default/repo/add_edit.html changed (mode: 100644) (index dee1818..e7a336a)
35 35 </select> </select>
36 36 </p> </p>
37 37
38 <p>
39 <label for="template">Bug template</label><br />
40 <textarea name="template" id="template" rows="6" cols="30">@@ri::template@@</textarea>
41 </p>
42
38 43 <p> <p>
39 44 <label for="max_commit_size">Max commit size (bytes, 0 = unlimited)</label><br /> <label for="max_commit_size">Max commit size (bytes, 0 = unlimited)</label><br />
40 45 <input type="text" name="max_commit_size" id="max_commit_size" value="@@ri::max_commit_size@@" /> <input type="text" name="max_commit_size" id="max_commit_size" value="@@ri::max_commit_size@@" />
File tests/helpers.inc.php changed (mode: 100644) (index 01aaf99..868ee47)
... ... function rg_test_create_repo($db, $rg_ui, &$extra)
121 121 $new['git_dir_done'] = 0; $new['git_dir_done'] = 0;
122 122 $new['public'] = 1; $new['public'] = 1;
123 123 $new['license'] = 'GPL <xss>'; $new['license'] = 'GPL <xss>';
124 $new['template'] = 'template here <xss>';
124 125 $_repo_id++; $_repo_id++;
125 126
126 127 rg_log("Deleting repo " . $repo_id . "/" . $new['name']); rg_log("Deleting repo " . $repo_id . "/" . $new['name']);
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