Open
Conversation
b38ca6d to
e0fba99
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add /tags endpoint to gitter to serve CVE conversion.
Given repo url, it returns the full list of tags (stripped of the "refs/tag/" prefix) and the associated hash.
Response Codes:
200: If repo has tags
204 (No content): If repo exists but there are no tags
404: Repo not found
Example response:
Note on annotated vs lightweight tags:
When tags are annotated (
git tag -a), git will create a separate tag object to contain metadata (tagger, date, etc) with its own hash.This results in annotated tags effectively resolving to two objects when we do
ls-remoteorshow-refTake https://github.com/ossf/scorecard as an example, gitter's response will contain:
{ "label": "v5.4.0", "hash": "FULSTmQUBv/amP3sUMXuB9JHJiY=" } <- Don't use this { "label": "v5.4.0^{}", "hash": "gO4+z+34sZq4mRcTqf2y59zXJi4=" } <- Use thisWhen it's a lightweight tag, the resolved hash is the commit.
TODO for this PR:
Some possible improvements I can think of (to be discussed):
This description might look AI generated, but I actually wrote it myself!