mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
修复:读取仓库数据使用拥有者token
This commit is contained in:
@@ -173,7 +173,7 @@ class PullRequestsController < ApplicationController
|
||||
@issue_user = @issue.user
|
||||
@issue_assign_to = @issue.get_assign_user
|
||||
@gitea_pull = Gitea::PullRequest::GetService.call(@owner.login,
|
||||
@repository.identifier, @pull_request.gitea_number, current_user&.gitea_token)
|
||||
@repository.identifier, @pull_request.gitea_number, @owner&.gitea_token)
|
||||
@last_review = @pull_request.reviews.take
|
||||
end
|
||||
|
||||
@@ -237,12 +237,12 @@ class PullRequestsController < ApplicationController
|
||||
|
||||
|
||||
def files
|
||||
@files_result = Gitea::PullRequest::FilesService.call(@owner.login, @project.identifier, @pull_request.gitea_number, current_user&.gitea_token)
|
||||
@files_result = Gitea::PullRequest::FilesService.call(@owner.login, @project.identifier, @pull_request.gitea_number, @owner&.gitea_token)
|
||||
# render json: @files_result
|
||||
end
|
||||
|
||||
def commits
|
||||
@commits_result = Gitea::PullRequest::CommitsService.call(@owner.login, @project.identifier, @pull_request.gitea_number, current_user&.gitea_token)
|
||||
@commits_result = Gitea::PullRequest::CommitsService.call(@owner.login, @project.identifier, @pull_request.gitea_number, @owner&.gitea_token)
|
||||
# render json: @commits_result
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user