+/**
+This a mostly a static class that manages an array of it'self...
+*/
static RooProject _RooProject;
public class RooProject : Object
{
+
+ public string id; // not really important that they are numbers..
+ public string code;
+ public string name;
+ public string type;
+
+
+ // --- static from here on....
+
+
+
static Gee.ArrayList<RooProject> _projects;
static int loadcount = 0;
const string roourl = "https://roojs.com/admin.php/Roo";
return _RooProject;
}
- public string id; // not really important that they are numbers..
- public string code;
- public string name;
- public string type;
-
public static Gee.ArrayList<RooProject> projects()
{
public static RooProject? getProjectByRepo(GitRepo repo)
{
- RooProject.singleton();
+ RooProject.singleton(); // init...
// fixme -- needs to get from rep list..
- var rt = RooTicket.singleton();
- if (rt.repos.size < 1) {
- rt.loadRepos();
- }
-
-
+
var pid = "";
- foreach(var roo_repo in rt.repos) {
+ foreach(var roo_repo in RooRepo.repos()) {
if (roo_repo.shortname == repo.name) {
pid = roo_repo.project_id;
break;