forked from drone/go-scm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter statuses in the github driver
GitHub keeps multiple versions of a check with the same label. The API returns the list in reverse chronological order: https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref. The status resource in go-scm does not expose any information that might help distinguish between versions of checks with the same label. When a client of go-scm receives a list of statuses that contain duplicate labels, it has no way of finding out which one is the most recent one. Change the github driver to filter the statuses and only return one (the most recent) for each label. Fixes drone#79
- Loading branch information
Showing
2 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters