Compare commits

..

No commits in common. "432cf59cf8be366a826d153cd364289a6d021450" and "28e355510b369cf1e83f55ab4023385ade30e45a" have entirely different histories.

15 changed files with 89 additions and 0 deletions

BIN
archived/eventsource.zip Normal file

Binary file not shown.

BIN
archived/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

BIN
archived/logo3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
archived/orm.zip Normal file

Binary file not shown.

BIN
archived/poll.zip Normal file

Binary file not shown.

BIN
archived/relations.zip Normal file

Binary file not shown.

BIN
archived/rethink.zip Normal file

Binary file not shown.

BIN
archived/seeder.zip Normal file

Binary file not shown.

View file

@ -0,0 +1,75 @@
#!/usr/bin/env python
from __future__ import print_function
import os
from github import Github
github_token = os.getenv("GITHUB_TOKEN")
packages_dir = "./packages"
if not github_token:
print("$GITHUB_TOKEN environment variable missing.")
quit()
gh = Github(github_token)
for basename in os.listdir(packages_dir):
path = os.path.join(packages_dir, basename)
if os.path.isdir(path):
print("===Entering repo `" + basename + "`")
repo = gh.get_repo("angel-dart/" + basename)
if repo.owner.login != "angel-dart-archive":
# Manually do the transfer...
params = {"new_owner": "angel-dart-archive"}
repo._requester.requestJsonAndCheck(
"POST", repo.url + "/transfer", input=params,
)
print("======Transferred `" + basename + "` to angel-dart-archive")
if repo.archived:
print("======SKIPPED ARCHIVED REPO")
continue
new_desc = "moved to angel-dart/angel/packages/" + basename
new_homepage = "https://github.com/angel-dart/angel/tree/master/packages/" + basename
if (repo.description != new_desc) or (repo.homepage != new_homepage):
repo.edit(description=new_desc, homepage=new_homepage)
print("======Changed description+homepage")
open_issues = repo.get_issues(state="open")
for issue in open_issues:
label_name = "package:" + basename
label_found = False
for label in issue.labels:
if label.name == label_name:
label_found = True
break
if not label_found:
issue.edit(labels=[label_name])
print("======Labeled issue \"" + issue.title + "\"")
# Duplicate the issue in angel-dart/angel...
angel = gh.get_repo("angel-dart/angel")
body = "*This issue was originally created by @" + issue.user.login
body += " here, before being automatically moved: "
body += "\n" + issue.html_url
body += "*\n\n---\n" + issue.body
new_issue = angel.create_issue(title=issue.title, labels=[label_name], body=body)
for comment in issue.get_comments():
comment_body = "@" + comment.user.login + " commented:\n\n" + comment.body
new_issue.create_comment(comment_body)
new_body = "*This issue was automatically moved to: " + new_issue.html_url + "."
issue.edit(state='closed', body=new_body)
print("======Moved issue \"" + issue.title + "\"")
open_pulls = repo.get_pulls(state="open")
for pull in open_pulls:
msg = "Hi, @" + pull.user.login + "! Thanks again for this PR."
msg += "\n\nAll Angel subprojects have been consolidated into a single monorepo: "
msg += "https://github.com/angel-dart/angel."
msg += "\n\nPlease fork the monorepo, and open a new PR there instead."
pull.create_issue_comment(msg)
pull.edit(state='closed')
print("======Commented on + closed PR \"" + pull.title + "\"")
# Archive the repository!
repo.edit(archived=True)
print("======Archived `" + basename + "`. Rest in Peace!")

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
#
# Simple tool script that pulls an angel-dart/<name> project into ./packages/<name>.
if [ "$#" == "0" ]; then
echo "usage: pull_subproject <names...>"
exit 1
fi
set -ex
for project in $*; do
git subtree add --prefix="packages/$project" "https://github.com/angel-dart/$project.git" master
done

BIN
archived/typed_service.zip Normal file

Binary file not shown.

BIN
archived/wings.zip Normal file

Binary file not shown.

0
utils/.gitkeep Normal file
View file

0
wspace/.gitkeep Normal file
View file