From 220c9ec000ca6e0670014e0f3f2d9dae9c47a78c Mon Sep 17 00:00:00 2001 From: wangdong Date: Sun, 26 Jan 2014 17:24:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?groovy=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 10 ++++++++-- src/test/groovy/GitlabMRTest.groovy | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 src/test/groovy/GitlabMRTest.groovy diff --git a/pom.xml b/pom.xml index 8cb26275..93f045bf 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.gitlab java-gitlab-api - 1.1.3-SNAPSHOT + 1.1.4-SNAPSHOT Gitlab Java API Wrapper A Java wrapper for the Gitlab Git Hosting Server API @@ -47,6 +47,12 @@ + + org.codehaus.groovy + groovy-all + 2.2.1 + test + org.codehaus.jackson jackson-core-asl @@ -76,4 +82,4 @@ - \ No newline at end of file + diff --git a/src/test/groovy/GitlabMRTest.groovy b/src/test/groovy/GitlabMRTest.groovy new file mode 100644 index 00000000..842375fb --- /dev/null +++ b/src/test/groovy/GitlabMRTest.groovy @@ -0,0 +1,22 @@ +import org.gitlab.api.GitlabAPI +import org.junit.Before +import org.junit.Test + +class GitlabMRTest { + GitlabAPI api; + + @Before + public void setup() { + api = GitlabAPI.connect("http://wpsgit.kingsoft.net", "gid46Y9qHTMjGcA1byUC"); + } + + @Test + void testMergeRequest() { + def prjLst = api.getAllProjects() + def prj = prjLst.find{ prj -> prj.getPathWithNamespace() == 'wangdong/engine' } + def mrLst = api.getOpenMergeRequests(prj) + def m = mrLst[0] + + println api.getAllNotes(m)[-1].getAuthor().getName() + } +} From e657161ddaeb25d5b2cbca3921b0476385f02a17 Mon Sep 17 00:00:00 2001 From: wangdong Date: Sun, 26 Jan 2014 18:20:36 +0800 Subject: [PATCH 2/2] groovy --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 93f045bf..ea7058a9 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.gitlab java-gitlab-api - 1.1.4-SNAPSHOT + 1.1.2-groovy-SNAPSHOT Gitlab Java API Wrapper A Java wrapper for the Gitlab Git Hosting Server API