GithubHelp home page GithubHelp logo

find_forks's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

find_forks's Issues

Count how many commits are the other forks ahead of the upstream

image

So this information can be show together with the others when presenting the forks data:

image

Possible interesting forks
                                 | forks | stargazers | watchers | ahead | behind
----------------------------------------------------------------
                   github-user-2 |    0  |    1       |    1     |    50 |  22

How to find all other forks and the upstream from my fork?

I have several forks to look for updates:

  1. https://github.com/evandrocoan/SublimeTextStudio/blob/develop/.gitmodules

Can somehow I make it run from my forks, so it can find the upstream and all the other forks and check for updates? Perhaps a list of upstreams could help.


Update:

Running:

https://api.github.com/repos/evandrocoan/Packages/forks?per_page=1&page=1

On my fork, return empty from the github api. I need to pass the user name for the original repository owner sublimehq, instead of the one of my fork.

Download all forks

Possible interesting forks
                                 | forks | stargazers | watchers
----------------------------------------------------------------
                     some-user-1 |    3 |    1 |    1
                     some-user-2 |    2 |    1 |    1
                     some-user-3 |    1 |    1 |    1
                     some-user-4 |    0 |    1 |    0

Users with forks > 0 should be checked and their forks added to remotes, because forks API of main repo doesn't get all forks (forks of fork).

Username mangling for ssh repos

Hello again,

I think I found an edge case (related to #2).

The repo I was running find_forks against was https://github.com/tjerkw/Android-SlideExpandableListView.

The remote setup:

[11:09 am] ~/dev/Android-SlideExpandableListView (master) $ git remote -v
origin  [email protected]:tjerkw/Android-SlideExpandableListView.git (fetch)
origin  [email protected]:tjerkw/Android-SlideExpandableListView.git (push)

The error when I run find_forks:

[11:09 am] ~/dev/Android-SlideExpandableListView (master) $ python3 ../git/find_forks
git config --get remote.origin.url
Open https://api.github.com/repos/jerkw/Android-SlideExpandableListView/forks?per_page=100
Error: Not Found
git fetch --all
Fetching origin
There are no interesting forks

The username is tjerkw but the URL is attempting to access jerkw

Changing it to https fixes the problem:

[11:10 am] ~/dev/Android-SlideExpandableListView (master) $ git remote set-url origin https://github.com/tjerkw/Android-SlideExpandableListView.git
[11:10 am] ~/dev/Android-SlideExpandableListView (master) $ python3 ../git/find_forksgit config --get remote.origin.url
Open https://api.github.com/repos/tjerkw/Android-SlideExpandableListView/forks?per_page=100
<output omitted>

How to stop opening a new terminal window for each command?

I am import this like this:

import os
import sys

current_directory = os.path.dirname( os.path.realpath( __file__ ) )
sys.path.insert( 0, os.path.join( current_directory, 'find_forks/six' ) )
sys.path.insert( 0, os.path.join( current_directory, 'find_forks/find_forks' ) )

from find_forks import find_forks
...
            user, repository = parse_upstream( upstream )
            find_forks( user, repository )

But for each git command command it do, it open a new shell terminal window.

Support for repos cloned with ssh

Example:

[11:13 am] ~/dev/scrap/$ git clone [email protected]:frost-nzcr4/webmoney.git
Cloning into 'webmoney'...
remote: Counting objects: 302, done.
remote: Total 302 (delta 0), reused 0 (delta 0), pack-reused 302
Receiving objects: 100% (302/302), 74.83 KiB | 0 bytes/s, done.
Resolving deltas: 100% (142/142), done.
Checking connectivity... done.
[11:14 am] ~/dev/scrap/$ cd webmoney/
[11:14 am] ~/dev/scrap/webmoney (master) $ python ~/dev/git/find_forks/ --dry-run
git config --get remote.origin.url
Open https://api.github.com/repos/[email protected]:frost-nzcr4/webmoney/forks?per_page=100
Error: Not Found
git fetch --all
There are no interesting forks
https://api.github.com/repos/[email protected]:frost-nzcr4/webmoney/forks?per_page=100

should be

https://api.github.com/repos/frost-nzcr4/webmoney/forks?per_page=100

Basic check for leaf

Hello @frost-nzcr4 .
For example, my local repo it's fork of more popular repo. My repo has't fork.
I want to get all forks of more popular repo that has changes but not merged in to popular repo.
Can you add this feature?

Remove duplicated branches

Temporary you can remove them running git branch -r --merged | grep -v -e "\(origin\|your\-github\-name\)/" | xargs -n 1 git branch -r -d

Cannot run this with any method

Now you can run find_forks one of the following methods:

specify path to folder:

python /path/to/find_forks
C:\Users\endolith\Sync\Programming\Wavelets\aaren wavelets\wavelets (my_changes)
(base) λ python C:\Users\endolith\Documents\GitHub\find_forks
Traceback (most recent call last):
  File "C:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\endolith\Documents\GitHub\find_forks\__main__.py", line 8, in <module>
    from .find_forks.find_forks import main
ImportError: attempted relative import with no known parent package
specify module name If find_forks in your PYTHONPATH:

python -m find_forks
C:\Users\endolith\Sync\Programming\Wavelets\aaren wavelets\wavelets (my_changes)
λ python -m find_forks
C:\Anaconda3\python.exe: No module named find_forks.__main__; 'find_forks' is a package and cannot be directly executed
or if you obtained zip from github you could simply run it:

python /path/to/find_forks.zip
C:\Users\endolith\Sync\Programming\Wavelets\aaren wavelets\wavelets (my_changes)
(base) λ python C:\Users\endolith\Downloads\find_forks-master.zip
  File "C:\Users\endolith\Downloads\find_forks-master.zip", line 1
    PK♥♦
      ^
SyntaxError: invalid syntax
C:\Users\endolith\Sync\Programming\Wavelets\aaren wavelets\wavelets (my_changes)
λ python C:\Users\endolith\Documents\GitHub\find_forks\find_forks\find_forks.py
Traceback (most recent call last):
  File "C:\Users\endolith\Documents\GitHub\find_forks\find_forks\find_forks.py", line 14, in <module>
    from .__init__ import CONFIG
ImportError: attempted relative import with no known parent package

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.