Пример #1
0
def create(args):
  dir=args[0]

  if len(args)>1:
    proof=args[1]
  else:
    proof=None

  m=Mint(dir)
  m.create(proof)
Пример #2
0
def create(args):
    username = args[0]
    token = args[1]
    project = args[2]
    branch = args[3]

    m = Mint("GitBank")

    agh = github.GitHub(username, token)
    user = agh.users.show(username)
    parts = project.split("/")
    commits = agh.commits.forBranch(parts[0], parts[1], branch)
    collabs = agh.repos.collaborators(parts[0], parts[1])

    if username in collabs:
        print("You can't mint from your own repo.")
    else:
        print("Searching for commits")
        for commit in commits:
            if commit.committer.login == username:
                print("http://github.com" + commit.url)
                m.create(commit.url)