Example #1
0
 /**
  * Creates an issue tracker component.
  */
 private void setDefaultAssignee(String channel, String sender, String subcomponent, String owner) {
     if (!isSenderAuthorized(channel,sender)) {
         insufficientPermissionError(channel);
         return;
     }
     
     sendMessage(channel,String.format("Changing default assignee of subcomponent %s to %s",subcomponent,owner));
     
     try {
         JiraScraper js = new JiraScraper();
         js.setDefaultAssignee("JENKINS", subcomponent, AssigneeType.COMPONENT_LEAD, owner);
         sendMessage(channel,"Default assignee set to " + owner);
     } catch (Exception e) {
         sendMessage(channel,"Failed to set default assignee: "+e.getMessage());
         e.printStackTrace();
     }
 }