-
Notifications
You must be signed in to change notification settings - Fork 6
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
Migrate some open source repositories to the new ppa url #54
Comments
For
(to avoid replacing |
Here's a script I used to find some "popular" and "recently maintained" repositories referencing the old ppa name: import argparse
import datetime
import json
import urllib.parse
import requests
def dt(s):
return datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ')
def main():
parser = argparse.ArgumentParser()
parser.add_argument('query')
parser.add_argument('--pages', default=5, type=int)
parser.add_argument('--min-stars', default=25, type=int)
parser.add_argument('--days', default=180, type=int)
args = parser.parse_args()
now = datetime.datetime.utcnow()
days_max = datetime.timedelta(args.days)
with open('all-repos3.json') as f:
contents = json.load(f)
username = contents['push_settings']['username']
password = contents['push_settings']['api_key']
query = urllib.parse.quote(args.query)
url = f'https://api.github.com/search/code?q={query}&per_page=100'
limit = args.pages
ret = []
kwargs = {'auth': requests.auth.HTTPBasicAuth(username, password)}
resp = requests.get(url, **kwargs)
resp.raise_for_status()
ret.extend(resp.json()['items'])
limit -= 1
while limit > 0 and 'next' in resp.links:
url = resp.links['next']['url']
resp = requests.get(url, **kwargs)
resp.raise_for_status()
ret.extend(resp.json()['items'])
limit -= 1
res = set()
for result in ret:
resp = requests.get(result['repository']['url'], **kwargs)
resp.raise_for_status()
repo = resp.json()
if (
repo['stargazers_count'] >= args.min_stars and
now - dt(repo['pushed_at']) <= days_max
):
res.add(result['repository']['full_name'])
import pprint; pprint.pprint(sorted(res))
if __name__ == '__main__':
exit(main()) The query I'm using EDIT: Apparently |
Made a few improvements to |
Here's the commandline I'm going to run (without all-repos-sed -C all-repos3.json --dry-run -r 's#ppa:fkrull/deadsnakes($|[^-])#ppa:deadsnakes/ppa\1#g' '*' --branch-name update_deadsnakes_ppa_name --commit-msg 'Update deadsnakes ppa name
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54' |
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
More info here : apache/mxnet#9268 deadsnakes/issues#54
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
More info here : apache/mxnet#9268 deadsnakes/issues#54
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
The deadsnakes ppa has changed names! For more information, see deadsnakes/issues#54 Committed via https://github.com/asottile/all-repos
Mostly to avoid #53
I'm going to attempt to use https://github.com/asottile/all-repos plus some scripting to update some public github repositories to the new ppa location.
For those without context:
We moved to a shared PPA name so that contributors could be added and releases could be made separately. Updating is simple, replacing
ppa:fkrull/deadsnakes
withppa:deadsnakes
(or the full nameppa:deadsnakes/ppa
)The text was updated successfully, but these errors were encountered: