Package org.eclipse.mylyn.github.internal

Examples of org.eclipse.mylyn.github.internal.GitHubCredentials


            // verify the credentials
            if (auth == null) {
              setStatus(GitHubUi.createErrorStatus("Credentials are required.  Please specify username and API Token."));
              return;
            }
            GitHubCredentials credentials = new GitHubCredentials(auth.getUserName(), auth.getPassword());
            if (!service.verifyCredentials(credentials)) {
              setStatus(GitHubUi.createErrorStatus("Invalid credentials.  Please check your GitHub User ID and API Token.\nYou can find your API Token on your GitHub account settings page."));
              return
            }
          } catch (GitHubServiceException e) {
View Full Code Here


    final GitHubIssue issue = new GitHubIssue();
    issue.setUser(TEST_USER);
    issue.setBody("This is a test body");
    issue.setTitle("Issue Title");
    GitHubIssue newIssue = service.openIssue(TEST_USER, TEST_PROJECT, issue,
        new GitHubCredentials(TEST_USER,API_KEY));
    assertTrue(newIssue != null);
    assertEquals(issue.getUser(),newIssue.getUser());
    assertEquals(issue.getBody(),newIssue.getBody());
    assertEquals(issue.getTitle(),newIssue.getTitle());
    assertTrue(newIssue.getNumber() != null && newIssue.getNumber().length() > 0);
View Full Code Here

    final GitHubIssue issue = new GitHubIssue();
    issue.setUser(TEST_USER);
    issue.setBody("This is a test body");
    issue.setTitle("Issue Title");
    GitHubIssue newIssue = service.openIssue(TEST_USER, TEST_PROJECT, issue,
        new GitHubCredentials(TEST_USER,API_KEY));
    assertTrue(newIssue != null);
   
    newIssue.setTitle(newIssue.getTitle()+" - modified");
    newIssue.setBody(newIssue.getBody()+" - modified");
   
    service.editIssue(TEST_USER, TEST_PROJECT, issue, new GitHubCredentials(TEST_USER,API_KEY));
   
    GitHubIssue showIssue = service.showIssue(TEST_USER, TEST_PROJECT, issue.getNumber());
   
    assertTrue(showIssue != null);
    assertEquals(newIssue.getTitle(),showIssue.getTitle());
View Full Code Here

   */
  @Test
  public void addLabel() throws Exception {
    final GitHubService service = new GitHubService();
    final boolean result = service.addLabel(TEST_USER, TEST_PROJECT,
        "lame", 1, new GitHubCredentials(TEST_USER,API_KEY));
    assertTrue(result);
  }
View Full Code Here

   */
  @Test
  public void removeLable() throws Exception {
    final GitHubService service = new GitHubService();
    final boolean result = service.removeLabel(TEST_USER, TEST_PROJECT,
        "lame", 1, new GitHubCredentials(TEST_USER,API_KEY));
    assertTrue(result);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.mylyn.github.internal.GitHubCredentials

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.