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

Improve the commit finding approach #537

Open
behnazh-w opened this issue Nov 2, 2023 · 0 comments
Open

Improve the commit finding approach #537

behnazh-w opened this issue Nov 2, 2023 · 0 comments
Assignees
Labels
repository_finder The issues related to the repository finder

Comments

@behnazh-w
Copy link
Member

behnazh-w commented Nov 2, 2023

Instead of looking up tags directly, we can get the releases through the GitHub API and retrieve the tag/commit:

https://api.github.com/repos/OWNER/REPO/releases

For example part of the response for https://api.github.com/repos/google/guava/releases is:

    "tag_name": "v32.1.3",
    "target_commitish": "master",
    "name": "32.1.3",
    "draft": false,
    "prerelease": false,
    "created_at": "2023-10-10T20:34:53Z",
    "published_at": "2023-10-10T22:20:41Z",

This way we can prune the unrelated tags and further filter the draft and prerelease results. This seems to be a better approach or at least a good way to improve precision.

If repository is not using GitHub releases, the API returns an empty list. In this case we can fall back to checking the tags.

Note: by finding the corresponding release tag, we can populate the release_tag attribute of the Repository object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repository_finder The issues related to the repository finder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants