Examples of PullRequest


Examples of models.PullRequest

        //Then
        assertThat(status(result)).isEqualTo(BAD_REQUEST);

        Project project = Project.findByOwnerAndProjectName(ownerLoginId, projectName);
        PullRequest pullRequest = PullRequest.findOne(project, pullRequestNumber);

        assertThat(pullRequest.state).isEqualTo(State.OPEN);
    }
View Full Code Here

Examples of models.PullRequest

            throws Exception {
        this.ownerLoginId = ownerLoginId;
        this.projectName = projectName;
        this.pullRequestNumber = pullRequestNumber;
        Project project = Project.findByOwnerAndProjectName(ownerLoginId, projectName);
        PullRequest pullRequest = PullRequest.findOne(project, pullRequestNumber);
        initRepositories(pullRequest);
    }
View Full Code Here

Examples of models.PullRequest

    @Test
    public void buildCloneRepository() throws GitAPIException, IOException {
        // Given
        Project original = createProject("keesun", "test");
        PullRequest pullRequest = createPullRequest(original);
        new GitRepository("keesun", "test").create();

        // When
        Repository repository = GitRepository.buildMergingRepository(pullRequest);
View Full Code Here

Examples of models.PullRequest

    @Test
    public void deleteBranch() throws IOException, GitAPIException {
        // Given
        Project original = createProject("keesun", "test");
        PullRequest pullRequest = createPullRequest(original);
        new GitRepository(original).create();
        Repository repository = GitRepository.buildMergingRepository(pullRequest);

        Git git = new Git(repository);
        String branchName = "refs/heads/master";
View Full Code Here

Examples of models.PullRequest

    @Test
    public void fetch() throws IOException, GitAPIException {
        // Given
        Project original = createProject("keesun", "test");
        PullRequest pullRequest = createPullRequest(original);
        new GitRepository(original).create();
        Repository repository = GitRepository.buildMergingRepository(pullRequest);

        RevCommit commit = newCommit(original, repository, "readme.md", "hello 1", "commit 1");
        new Git(repository).push().call();
View Full Code Here

Examples of models.PullRequest

    @Test
    public void checkout() throws IOException, GitAPIException {
        // Given
        Project original = createProject("keesun", "test");
        PullRequest pullRequest = createPullRequest(original);
        new GitRepository(original).create();
        Repository repository = GitRepository.buildMergingRepository(pullRequest);
        // 커밋이 없으면 HEAD도 없어서 브랜치 만들 때 에러가 발생하기 때문에 일단 하나 커밋한다.
        newCommit(original, repository, "readme.md", "hello 1", "commit 1");
View Full Code Here

Examples of models.PullRequest

    @Test
    public void merge() throws IOException, GitAPIException {
        // Given
        Project original = createProject("keesun", "test");
        PullRequest pullRequest = createPullRequest(original);
        GitRepository gitRepository = new GitRepository(original);
        gitRepository.create();
        Repository repository = GitRepository.buildMergingRepository(pullRequest);

        // master에 commit 1 추가
View Full Code Here

Examples of models.PullRequest

    @Test
    public void push() throws IOException, GitAPIException {
        // Given
        Project original = createProject("keesun", "test");
        PullRequest pullRequest = createPullRequest(original);
        new GitRepository(original).create();
        Repository repository = GitRepository.buildMergingRepository(pullRequest);
        // master에 commit 1 추가
        String fileName = "readme.md";
        String content = "hello 1";
View Full Code Here

Examples of models.PullRequest

    public void getRelatedAuthors() throws IOException, GitAPIException, LimitExceededException {
        FakeApplication app = support.Helpers.makeTestApplication();
        Helpers.start(app);

        Project project = createProject("yobi", "test");
        PullRequest pullRequest = createPullRequest(project);
        GitRepository gitRepository = new GitRepository(project);
        gitRepository.create();
        Repository repository = GitRepository.buildMergingRepository(pullRequest);

        // Given
View Full Code Here

Examples of models.PullRequest

        new Git(noneBareClone).checkout().setName(branchName).call();
        newCommit(original, noneBareClone, "README.md", "world", "second commit");
        GitRepository.push(noneBareClone, GitRepository.getGitDirectoryURL(original), featureBranchName, featureBranchName);

        // feature 브랜치에서 master 브랜치로 코드를 보낸다.
        final PullRequest pullRequest = createPullRequest(original);
        pullRequest.toProject = original;
        pullRequest.fromProject = original;
        pullRequest.toBranch = Constants.R_HEADS + Constants.MASTER;
        pullRequest.fromBranch = branchName;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.