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

GitHub driver does not handle multiple statuses with the same label (context) #79

Closed
afrittoli opened this issue Mar 10, 2020 · 1 comment · Fixed by #80
Closed

GitHub driver does not handle multiple statuses with the same label (context) #79

afrittoli opened this issue Mar 10, 2020 · 1 comment · Fixed by #80

Comments

@afrittoli
Copy link

GitHub keeps multiple versions of a check with the same label (context). 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.

I think the best way forward is for the github driver to filter the statuses and only return one (the most recent) for each label.

More context: tektoncd/pipeline#2188

@afrittoli
Copy link
Author

/area github

afrittoli added a commit to afrittoli/jenkins-x-go-scm that referenced this issue Mar 10, 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 jenkins-x#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 a pull request may close this issue.

1 participant