mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-04 08:21:23 +00:00
Fix GHRepository#listWorkflows() and add a test
This commit is contained in:
20
src/main/java/org/kohsuke/github/GHWorkflowsPage.java
Normal file
20
src/main/java/org/kohsuke/github/GHWorkflowsPage.java
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user