Skip to content

feat(gitter): tags endpoint#5181

Draft
Ly-Joey wants to merge 3 commits intogoogle:masterfrom
Ly-Joey:feat-gitter-cve
Draft

feat(gitter): tags endpoint#5181
Ly-Joey wants to merge 3 commits intogoogle:masterfrom
Ly-Joey:feat-gitter-cve

Conversation

@Ly-Joey
Copy link
Copy Markdown
Contributor

@Ly-Joey Ly-Joey commented Apr 2, 2026

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 commit hash.

Response Codes:
200: If repo has tags
204 (No content): If repo exists but there are no tags
404: Repo not found

TODO for this PR:

  • Find a way to test the ls-remote code path locally. And more tests in general

Follow-ups PRs:

  • Populate repository struct with show-ref / ls-remote output
    • This requires some changes to the existing loadRepository function. I also want the separate PR to do some small refactoring (e.g. putting repo struct behind locks)
  • Possibly spin up background process to pre-load the repo if it is valid

path := filepath.Join(gitStorePath, repoDirName)

// Only if the repo is cloned locally, set repoPath
if _, err := os.Stat(filepath.Join(path, ".git")); err == nil {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
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