예제 #1
0
def updateMilestone(repo, issue, pr, dryRun):
  milestoneId = RELEASE_BRANCH_MILESTONE.get(pr.base.label.split(":")[1], None)
  if not milestoneId:
    print "Unable to find a milestone for the given branch"
    return
  if issue.milestone and issue.milestone.id==milestoneId: return
  milestone = repo.get_milestone(milestoneId)
  print "Setting milestone to %s" % milestone.title
  if dryRun: return
  issue.edit(milestone=milestone)
예제 #2
0
def updateMilestone(repo, issue, pr, dryRun):
  milestoneId = RELEASE_BRANCH_MILESTONE.get(pr.base.label.split(":")[1], None)
  if not milestoneId:
    print "Unable to find a milestone for the given branch"
    return
  if issue.milestone and issue.milestone.id==milestoneId: return
  milestone = repo.get_milestone(milestoneId)
  print "Setting milestone to %s" % milestone.title
  if dryRun: return
  issue.edit(milestone=milestone)
예제 #3
0
def updateMilestone(repo, issue, pr, dryRun):
    if issue.milestone:
        return
    branch = pr.base.label.split(":")[1]
    milestoneId = RELEASE_BRANCH_MILESTONE.get(branch, None)
    if not milestoneId:
        print "Unable to find a milestone for the given branch"
        return
    milestone = repo.get_milestone(milestoneId)
    if issue.milestone:
        if issue.milestone == milestone:
            return
        else:
            print "Changing milestone from ", issue.milestone, " to ", milestone
    print "Setting milestone to %s" % milestone.title
    if dryRun:
        return
    issue.edit(milestone=milestone)
예제 #4
0
def updateMilestone(repo, issue, pr, dryRun):
  if issue.milestone:
    return
  branch = pr.base.label.split(":")[1]
  milestoneId = RELEASE_BRANCH_MILESTONE.get(branch, None)
  if not milestoneId:
    print "Unable to find a milestone for the given branch"
    return
  milestone = repo.get_milestone(milestoneId)
  if issue.milestone:
    if issue.milestone == milestone:
      return
    else:
      print "Changing milestone from ",issue.milestone," to ",milestone
  print "Setting milestone to %s" % milestone.title
  if dryRun:
    return
  issue.edit(milestone=milestone)