mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-05-20 17:28:51 +00:00
2d66cfcce2
All the client functions were in a single file, which was already very long, and the test file gets even longer as more tests are added. I split it into separate files representing the API path and started adding some tests.
14 lines
295 B
Go
14 lines
295 B
Go
package woodpecker
|
|
|
|
import "fmt"
|
|
|
|
const pathPipelineQueue = "%s/api/pipelines"
|
|
|
|
// PipelineQueue returns a list of enqueued pipelines.
|
|
func (c *client) PipelineQueue() ([]*Feed, error) {
|
|
var out []*Feed
|
|
uri := fmt.Sprintf(pathPipelineQueue, c.addr)
|
|
err := c.get(uri, &out)
|
|
return out, err
|
|
}
|