33import java .util .List ;
44
55import gitlab .api .WorkitemClientApi ;
6+ import gitlab .model .Group ;
7+ import gitlab .model .NotesFilterType ;
8+ import gitlab .model .Project ;
69import gitlab .model .WorkItemConnection ;
710import jakarta .inject .Inject ;
811import jakarta .ws .rs .GET ;
@@ -24,22 +27,41 @@ public String hello() {
2427 return "Hello from Quarkus REST" ;
2528 }
2629
30+ @ GET
31+ @ Path ("/group" )
32+ @ Produces (MediaType .TEXT_PLAIN )
33+ public String readGroup () {
34+ Group response = api .group ("tech-marketing/demos/gitlab-agile-demo/initech" , true , null );
35+ return response .toString ();
36+ }
37+
38+ @ GET
39+ @ Path ("/project" )
40+ @ Produces (MediaType .TEXT_PLAIN )
41+ public String readProject () {
42+ Project response = api .project ("tech-marketing/demos/gitlab-agile-demo/initech/music-store/parent-portal" , true , null );
43+ return response .toString ();
44+ }
45+
2746 @ GET
2847 @ Path ("/hardcoded" )
2948 @ Produces (MediaType .TEXT_PLAIN )
3049 public String read () {
31- String p = "stage/main/product-management " ;
50+ String p = "tech-marketing/demos/gitlab-agile-demo/initech " ;
3251 List <String > r = List .of (
33- "&1" );
34- WorkItemConnection response = api .workItemsByReference (p , r );
52+ "tech-marketing/demos/gitlab-agile-demo/initech/music-store&2" ,
53+ "tech-marketing/demos/gitlab-agile-demo/initech&2" ,
54+ "tech-marketing/demos/gitlab-agile-demo/initech&5" ,
55+ "tech-marketing/demos/gitlab-agile-demo/initech/music-store/parent-portal#2" );
56+ WorkItemConnection response = api .workItemsByReference (p , r , NotesFilterType .ONLY_COMMENTS );
3557 return response .toString ();
3658 }
3759
3860 @ GET
3961 @ Path ("/read" )
4062 @ Produces (MediaType .TEXT_PLAIN )
4163 public String read (@ QueryParam ("path" ) String path , @ QueryParam ("refs" ) List <String > refs ) {
42- WorkItemConnection response = api .workItemsByReference (path , refs );
64+ WorkItemConnection response = api .workItemsByReference (path , refs , NotesFilterType . ONLY_COMMENTS );
4365 return response .toString ();
4466 }
4567}
0 commit comments