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

ignore forks only having commits like "Merge pull request .. from .." #52

Closed
Ethkuil opened this issue Dec 4, 2022 · 8 comments
Closed

Comments

@Ethkuil
Copy link
Contributor

Ethkuil commented Dec 4, 2022

Actually there are nothing difference between them and the parent repo. So it would be better if they can be ignored too.

@Ethkuil Ethkuil changed the title filter forks only having commits like "Merge pull request .. from .." ignore forks only having commits like "Merge pull request .. from .." Dec 4, 2022
@payne911
Copy link
Collaborator

payne911 commented Dec 5, 2022

Mind showing an example?
My understanding is that if there's an extra commit saying something was merged into master... then there is indeed new content.

@Ethkuil
Copy link
Contributor Author

Ethkuil commented Dec 5, 2022

Mind showing an example? My understanding is that if there's an extra commit saying something was merged into master... then there is indeed new content.

Not always. For example, just sync with origin.

Actual examples are common. At random I choose a repo. I really find some useful forks, but useless forks shown are more than useful ones lol.

@payne911
Copy link
Collaborator

payne911 commented Dec 5, 2022

I do not disagree with this as being useful, but I believe analyzing the commit message would unfortunately require an extra API call way too often (something which is already very restrictive with regards to the tool's main purpose).

Useful-forks is mostly meant to be a tool that helps you filter most of the useless stuff out so that you may do your own manual research afterward. There are tons of "rules" I could add to make it smarter, but they mostly end up being impractical because of the GitHub API rate-limit.


One imperfect work-around you may use would be to assume that all forks with only 1 commit ahead are useless. When you click the settings clog icon next to the search field, you can then modify this value:

image

Eventually, I do plan on having some kind of dynamic analysis that would make searches more useful when the amount of forks isn't very high (because then I'm not limited by the amount of API calls as much). But it's mostly a matter of time and motivation before I do end up working on that feature.

@Ethkuil
Copy link
Contributor Author

Ethkuil commented Dec 5, 2022

I understand. And thanks for your work-around!

For me it's better to set Ahead filter 1 by default, because I have never see a useful fork with only one ahead commit. And it works great!

@Ethkuil
Copy link
Contributor Author

Ethkuil commented Dec 5, 2022

The limit from GitHub API is really hard to overcome. This is a dilemma "more targeted" versus "more comprehensive".

And maybe we can supply choices like filter by "last updated date", "watch/star"? They can help much when the forks are really really many. In the case certainly it's a big project, therefore we have reason to raise the standard. For example, I would not believe a fork of Linux that last updated in 2020 and no stars could be useful.

@payne911
Copy link
Collaborator

payne911 commented Dec 6, 2022

There are tons of filters that could be added. Date filter was requested in #37 for example.

For me it's better to set Ahead filter 1 by default, because I have never see a useful fork with only one ahead commit.

It's mostly been my experience as well, but I still don't think it should be default behavior.

@Ethkuil
Copy link
Contributor Author

Ethkuil commented Dec 6, 2022

I would like to have a try for it(about pre-filters before querying commit diff and post-analysis after querying commit diff) next month, and at that time we could continue talking about the design. At least they're helpful for me.

Current idea:

  • Add filter to take effect before appending new rows. The filter can be inputted as a filter expression like stars:>0 | pushed:>2022-01-01.
  • If a fork is with only 1 commit head, check whether the commit is a merge or new content. (no idea about how to achieve this).

@payne911
Copy link
Collaborator

payne911 commented Dec 6, 2022

If you are interested in contributing, you might want to look at where the main interests lie. Some features are definitely more requested than others: https://github.com/useful-forks/useful-forks.github.io/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

More in-line with what you are interested in, maybe this could help orient you: #37 (comment)


If a fork is with only 1 commit head, check whether the commit is a merge or new content. (no idea about how to achieve this).

There are two main things you'll interact with: the GitHub API, and the Octokit library (which is the bridge to GitHub's API).

You'll also want to read through this: https://github.com/useful-forks/useful-forks.github.io#contributing

@Ethkuil Ethkuil closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2023
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

No branches or pull requests

2 participants