def get_issue_comment(self, id): issue_comment = get(IssueComment, id) issue = self.get_issue_by_id(issue_comment.issue_id) if not issue: return None issue_comment.fillwith(issue) return issue_comment
def get_pullRequest_by_id(self, id): pullRequest = get(PullRequest, id) if pullRequest is not None: pullRequest.fillwith() return pullRequest
def get_pushrevref_by_id(self, id): pushrevref = get(PushRevRef, id) pushrevref.fillwith() return pushrevref
def get_commit_by_id(self, id): commit = get(CommitHistory, id) commit.fillwith() return commit
def get_repo_by_id(self, repo_id): return get(Repo, repo_id)
def get_webHookURL_by_id(self, _id): return get(WebHookURL, _id)
def get_pullRequest_by_repoId_id(self, repo_id, pullRequest_id): pullRequest = get(PullRequest, pullRequest_id) if pullRequest.desc_repo_id == repo_id: pullRequest.fillwith() return pullRequest return None
def remove_permission_item(self, repo_id, id): permissionItem = get(PermissionItem, id) if permissionItem and permissionItem.repo_id == repo_id: permissionItem.visibly = 1 permissionItem.save() return permissionItem
def get_issue_by_id(self, id): issue = get(Issue, id) issue.fillwith() return issue
def get_teamMember_by_id(self, id): return get(TeamMember, id)
def get_teamGroup_by_id(self, group_id): return get(TeamGroup, group_id)