Package com.groupon.jenkins.github.services

Examples of com.groupon.jenkins.github.services.GithubAccessTokenRepository


        GHUser ghUser = PowerMockito.mock(GHUser.class);
        PowerMockito.when(ghUser.getLogin()).thenReturn("theusername");
        PowerMockito.when(ghRepository.getOwner()).thenReturn(ghUser);

        GithubAccessTokenRepository ghAccessTokenRepository = new GithubAccessTokenRepository();
        PowerMockito.whenNew(GithubAccessTokenRepository.class).withNoArguments().thenReturn(ghAccessTokenRepository);

        String dotCiYaml = "environment:\n  language: ruby\n\nbuild:\n  before: echo \"get out of here denton\"\n  run:\n    unit: echo \"Unit test\"\n    integration: echo \"Integration test\"\n  after: echo it works right\n";
        GHContent content = PowerMockito.mock(GHContent.class);
        PowerMockito.when(content.getContent()).thenReturn(dotCiYaml);
View Full Code Here


    private final DynamicProjectRepository dynamicProjectRepository;
    private final GithubAccessTokenRepository githubAccessTokenRepository;
    private final GithubRepositoryService githubRepositoryService;

    public ProjectConfigInfo(String ghRepoName, GHRepository ghRepository) {
        this(ghRepoName, ghRepository, new DynamicProjectRepository(), new GithubAccessTokenRepository(), new GithubRepositoryService(ghRepository));
    }
View Full Code Here

@Extension
public class GithubTokenRefreshListener extends SecurityListener {
    @Override
    protected void authenticated(@Nonnull UserDetails details) {
        new GithubAccessTokenRepository().updateAccessToken(details.getUsername());
    }
View Full Code Here

TOP

Related Classes of com.groupon.jenkins.github.services.GithubAccessTokenRepository

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.