Skip to content

Commit

Permalink
Script for updating forked repos from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe2 committed Mar 22, 2022
1 parent 806083d commit 089e065
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions update-forks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Update forked repos in the fwilhe-containers org
# I fork those repos for two reasons:
# 1.: It allows me to control when they are synced with upstream (which might break things in the playbook)
# 2.: It allows me to change things for testing and experimentation purposes

from urllib.parse import urlparse
import subprocess

repos = []

with open('git-repos.txt') as git_urls:
repos = [(urlparse(u).path[1:]) for u in git_urls]

[subprocess.run(['gh', 'repo', 'sync', r]) for r in repos]

0 comments on commit 089e065

Please sign in to comment.