Fix GHRepository#listWorkflows() and add a test

This commit is contained in:
Guillaume Smet
2021-03-29 20:10:18 +02:00
parent cdc0e2ad6b
commit c19cfd98d1
10 changed files with 418 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
package org.kohsuke.github;
/**
* Represents the one page of workflow result when listing workflows.
*/
class GHWorkflowsPage {
private int total_count;
private GHWorkflow[] workflows;
public int getTotalCount() {
return total_count;
}
GHWorkflow[] getWorkflows(GHRepository owner) {
for (GHWorkflow workflow : workflows) {
workflow.wrapUp(owner);
}
return workflows;
}
}