/** Creates a new team and assigns the repositories. */
 public GHTeam createTeam(String name, Permission p, Collection<GHRepository> repositories)
     throws IOException {
   Poster post =
       new Poster(root)
           .withCredential()
           .with("team[name]", name)
           .with("team[permission]", p.name().toLowerCase());
   for (GHRepository r : repositories) {
     post.with("team[repo_names][]", r.getOwnerName() + '/' + r.getName());
   }
   return post.to("/organizations/" + login + "/teams", JsonTeam.class).wrap(this);
 }
示例#2
0
 /**
  * Return a clarifier object that can graphical highlight this error in a design diagram. Return a
  * clarifier for this todoitem, if not found by the poster, or null.
  *
  * @return an Icon or null if none found.
  */
 public Icon getClarifier() {
   Icon posterClarifier = thePoster.getClarifier();
   if (posterClarifier != null) {
     return posterClarifier;
   }
   return null;
 }
示例#3
0
 public boolean delete() {
   Node node = ForumManager.getCloud().getNode(id);
   if (node != null) {
     node.delete(true);
   }
   parent.deleteSignature(this);
   return true;
 }
示例#4
0
 /**
  * Reply true iff this ToDoItem should be kept on the Designer's ToDoList. This should return
  * false if the poster has been deactivated, or if it can be determined that the problem that
  * raised this issue is no longer present.
  *
  * @param d the given designer
  * @return true if the todoitem is still valid
  */
 public boolean stillValid(Designer d) {
   if (thePoster == null) {
     return true;
   }
   if (theWizard != null && theWizard.isStarted() && !theWizard.isFinished()) {
     return true;
   }
   return thePoster.stillValid(this, d);
 }
示例#5
0
 /**
  * Some problems can be automatically fixed, ask the Critic to do it if it can.
  *
  * @return true if the critic can automatically fix the problem
  */
 public boolean canFixIt() {
   return thePoster.canFixIt(this);
 }
示例#6
0
 /**
  * Some problems can be automatically fixed, ask the Critic to do it if it can.
  *
  * <p>
  */
 public void fixIt() {
   thePoster.fixIt(this, null);
 }
示例#7
0
 /**
  * Find the email address of the poster.
  *
  * @return the email address
  */
 public String getExpertEmail() {
   return thePoster.getExpertEmail();
 }
示例#8
0
 /** @return the description */
 public String getDescription() {
   if (cachedExpandedDescription == null) {
     cachedExpandedDescription = thePoster.expand(theDescription, theOffenders);
   }
   return cachedExpandedDescription;
 }
示例#9
0
 /** @return the headline */
 public String getHeadline() {
   if (cachedExpandedHeadline == null) {
     cachedExpandedHeadline = thePoster.expand(theHeadline, theOffenders);
   }
   return cachedExpandedHeadline;
 }