Package playRepository

Examples of playRepository.Commit


            if (pullRequest != null) {
                fromProject = pullRequest.fromProject;
            }
        }

        Commit commit = RepositoryService.getRepository(fromProject).getCommit(commitId);

        List<User> userList = new ArrayList<>();
        addCommitAuthor(commit, userList);
        addCodeCommenters(commitId, fromProject.id, userList);
        addProjectMemberList(project, userList);
View Full Code Here


            throws IOException, UnsupportedOperationException, ServletException, GitAPIException,
            SVNException, NoSuchMethodException {
        Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
        PlayRepository repository = RepositoryService.getRepository(project);

        Commit commit = null;

        try {
            commit = repository.getCommit(commitId);
        } catch (org.eclipse.jgit.errors.MissingObjectException e) {
            return notFound(ErrorViews.NotFound.render("error.notfound.commit", project));
        }

        if(commit == null) {
            return notFound(ErrorViews.NotFound.render("error.notfound.commit", project));
        }

        Commit parentCommit = repository.getParentCommitOf(commitId);
        List<CommentThread> threads
                = CommentThread.findByCommitId(CommentThread.find, project, commitId);

        String selectedBranch = StringUtils.defaultIfBlank(request().getQueryString("branch"), "HEAD");
        String path = StringUtils.defaultIfBlank(request().getQueryString("path"), "");
View Full Code Here

        if (codeCommentForm.hasErrors()) {
            return badRequest(ErrorViews.BadRequest.render("error.validation", project));
        }

        Commit commit = RepositoryService.getRepository(project).getCommit(commitId);

        if (commit == null) {
            return notFound(notfound.render("error.notfound", project, request().path()));
        }

        if (!AccessControl.isResourceCreatable(
                    UserApp.currentUser(), commit.asResource(project), ResourceType.COMMIT_COMMENT)) {
            return forbidden(ErrorViews.Forbidden.render("error.forbidden", project));
        }

        CommitComment codeComment = codeCommentForm.get();
        codeComment.project = project;
View Full Code Here

    @IsAllowed(Operation.READ)
    public static Result compare(String ownerName, String projectName, String revA, String revB)
            throws Exception {
        Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
        PlayRepository repository = RepositoryService.getRepository(project);
        Commit commitA = repository.getCommit(revA);
        Commit commitB = repository.getCommit(revB);

        if (commitA == null || commitB == null) {
            return notFound(ErrorViews.NotFound.render("error.notfound.commit", project));
        }
View Full Code Here

TOP

Related Classes of playRepository.Commit

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.