*/
-public class RooRepo : Object
-{
-
-
-
- public string id; // not really important that they are numbers..
- public string project_id;
- public string description;
- public string shortname;
-
-
-}
public class RooOption : Object
{
_RooTicket = new RooTicket();
_RooTicket.tickets = new Gee.ArrayList<RooTicket>();
- _RooTicket.repos = new Gee.ArrayList<RooRepo>();
+
_RooTicket.loadRepos(); // initalize it..
}
return _RooTicket;
}
public Gee.ArrayList<RooTicket> tickets; // only available for singletonn.
- public Gee.ArrayList<RooRepo> repos; // only available for singletonn.
+
public Gee.ArrayList<RooOption> milestones;
public Gee.ArrayList<RooOption> priorities;
return add;
}
- public RooProject? getProjectByRepo(GitRepo repo)
- {
- var rt = RooTicket.singleton();
-
- if (rt.repos.size < 1) {
- rt.loadRepos();
- }
-
-
- var pid = "";
- foreach(var roo_repo in rt.repos) {
- if (roo_repo.shortname == repo.name) {
- pid = roo_repo.project_id;
- break;
- }
- }
- if (pid == "") {
- GLib.debug("getProjectByRepo: repo has no project");
- return null;
- }
- // get project by id...
- foreach(var roo_project in RooProjects.projects()) {
- if (roo_project.id == pid) {
- GLib.debug("getProjectByRepo: project_id = %s", pid);
- return roo_project;
- }
- }
- GLib.debug("getProjectByRepo: can not find project");
- return null;
-
- }
+
public static RooTicket fakeTicket()