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

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

Open
evandrocoan opened this issue Jul 29, 2017 · 2 comments
Open

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

evandrocoan opened this issue Jul 29, 2017 · 2 comments

Comments

@evandrocoan
Copy link

evandrocoan commented Jul 29, 2017

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.

@evandrocoan evandrocoan changed the title Find all other forks and the upstream from my fork How to find all other forks and the upstream from my fork? Jul 29, 2017
@evandrocoan
Copy link
Author

evandrocoan commented Jul 31, 2017

I wrote a script which need to read the upstream link and them it run find_finks passing the upstream user and repository:

  1. https://github.com/evandrocoan/SublimeTextStudioChannel/blob/cca654fd4847c079036621509662534ec0306ec5/update.py#L166-L178
user, repository = parse_upstream( upstream )
command_line_interface = cmd.Cli( None, True )

# Find all forks, add them as remote and fetch them
run_command_line(
    command_line_interface,
    shlex.split( "python ../%s --user=%s --repo=%s" % ( find_forks_path, user, repository ) ),
    os.path.join( os.path.dirname( os.path.dirname( current_directory ) ), path ),
)

# Clean duplicate branches
run_command_line(
    command_line_interface,
    shlex.split( "sh ../%s/remove_duplicate_branches.sh %s" % ( find_forks_path, user ) ),
    os.path.join( os.path.dirname( os.path.dirname( current_directory ) ), path ),
)

@frost-nzcr4
Copy link
Owner

frost-nzcr4 commented Nov 13, 2017

Thanks, that's may be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants