Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented FindTag for github driver. #79

Merged
merged 2 commits into from
Oct 15, 2020

Conversation

chhsia0
Copy link
Contributor

@chhsia0 chhsia0 commented Oct 10, 2020

GitHub API doesn't have a /repo/{owner}/{repo}/tags/{tag} endpoint. However, it does have Git database API, which provides the /repo/{owner}/{repo}/git/ref/tags/{tag} endpoint. This PR implements FindTag with this API endpoint.

@bradrydzewski bradrydzewski merged commit 139d0b1 into drone:master Oct 15, 2020
jstrachan pushed a commit to jstrachan/go-scm that referenced this pull request Dec 22, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants