-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script for updating forked repos from upstream
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |