File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/test/java/org/kohsuke/github Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -114,4 +114,26 @@ public void createCheckRunErrMissingConclusion() throws Exception {
114114 }
115115 }
116116
117+ @ Test
118+ public void updateCheckRun () throws Exception {
119+ GHCheckRun checkRun = gitHub .getRepository ("jglick/github-api-test" )
120+ .createCheckRun ("foo" , "4a929d464a2fae7ee899ce603250f7dab304bc4b" )
121+ .withStatus (GHCheckRun .Status .IN_PROGRESS )
122+ .withStartedAt (new Date (999_999_000 ))
123+ .add (new GHCheckRunBuilder .Output ("Some Title" , "what happened…" )
124+ .add (new GHCheckRunBuilder .Annotation ("stuff.txt" ,
125+ 1 ,
126+ GHCheckRun .AnnotationLevel .NOTICE ,
127+ "hello to you too" ).withTitle ("Look here" )))
128+ .create ();
129+ GHCheckRun updated = checkRun .update ()
130+ .withStatus (GHCheckRun .Status .COMPLETED )
131+ .withConclusion (GHCheckRun .Conclusion .SUCCESS )
132+ .withCompletedAt (new Date (999_999_999 ))
133+ .create ();
134+ assertEquals (updated .getStartedAt (), new Date (999_999_000 ));
135+ assertEquals (updated .getName (), "foo" );
136+ assertEquals (1 , checkRun .getOutput ().getAnnotationsCount ());
137+ }
138+
117139}
You can’t perform that action at this time.
0 commit comments