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

Presenting stars and forks #219

Open
abstractionfactory opened this issue Sep 11, 2024 · 2 comments
Open

Presenting stars and forks #219

abstractionfactory opened this issue Sep 11, 2024 · 2 comments
Labels
enhancement New feature or request frontend

Comments

@abstractionfactory
Copy link
Collaborator

abstractionfactory commented Sep 11, 2024

The API now has information on stars and forks in the provider index (not the version) in the following format. Note that the repository information is (incorrectly) present on the version, not on the provider index file.

{
  "popularity": 5, /* Number of stars */
  "fork_count": 2, /* Number of forks from this repository */
  "fork_of_link": "https://github.com/hashicorp/aws", /* Link to the upstream repository this provider was forked from */
  "fork_of": "hashicorp/aws", /* OpenTofu name for the provider if it can be identified based on the upstream repository, may not be present */
  "upstream_popularity": 36,
  "upstream_fork_count": 16
}

We now have to decide how to present this in the frontend, which is where input is needed. We could, for example, do something like this:

[GITHUBICON]   opentofu/aws
[UPSTREAMICON] hashicorp/aws
[STARICON]     5 ([UPSTREAMICON] 36)
[FORKICON]     2 ([UPSTREAMICON] 16)

The fork icon could be something along these lines:

  O <-
  |
 / \
|   |
O   O

Your input is highly valued, please comment below!

@abstractionfactory abstractionfactory added enhancement New feature or request frontend labels Sep 11, 2024
@abstractionfactory abstractionfactory added this to the Stable Release milestone Sep 11, 2024
@ImIOImI
Copy link

ImIOImI commented Sep 11, 2024

I don't have anything to add other than I think this is an intuitive way to present interesting information. The only other thing that would be helpful is to measure how up to date the fork is (how many commits ahead and behind it is, etc.)... but I assume the API doesn't return that.

@abstractionfactory
Copy link
Collaborator Author

@ImIOImI the main issue here is the reindexing frequency. We only reindex if we have a new version, otherwise we don't touch the data at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

No branches or pull requests

2 participants