0

IS there a way to retrieve the latest builds for each branch in drone.io.. Travis-ci support this :

api GET /repos/{repository.id}/branches and show this in its UI:

https://travis-ci.org/{user}/{repository}/branches

janpio
  • 10,645
  • 16
  • 64
  • 107

2 Answers2

1

You can retrieve information about builds and then filter out by branch in your code.

https://drone.domain.com/api/repos/<USER>/<REPO>/builds

Replace with your host, user and repo.

https://github.com/drone/drone/blob/master/router/router.go#L72

0

If you want to retrieve the latest build for a single branch, you can filter it using conditions.

Example (for branch develop):

https://drone.domain.com/api/repos/<USER>/<REPO>/builds?branch=develop
madc
  • 1,674
  • 2
  • 26
  • 41