Browse Source

update two services

pull/323/head
zhangxunhui 3 years ago
parent
commit
744e0eddf8
3 changed files with 3 additions and 4 deletions
  1. +0
    -1
      app/controllers/pull_requests_controller.rb
  2. +1
    -1
      app/services/gitea/commit/diff_service.rb
  3. +2
    -2
      app/services/gitea/commit/info_service.rb

+ 0
- 1
app/controllers/pull_requests_controller.rb View File

@@ -263,7 +263,6 @@ class PullRequestsController < ApplicationController
else
# update issue to state 5
issue.update(status_id: 5)
normal_status(1, "合并成功")
end
end
end


+ 1
- 1
app/services/gitea/commit/diff_service.rb View File

@@ -22,7 +22,7 @@ class Gitea::Commit::DiffService < Gitea::ClientService

private
def params
Hash.new.merge(token: owner)
Hash.new.merge(token: token)
end

def url


+ 2
- 2
app/services/gitea/commit/info_service.rb View File

@@ -7,7 +7,7 @@ class Gitea::Commit::InfoService < Gitea::ClientService
# repo: 仓库名称/标识
# sha: commit唯一标识
# eg:
# Gitea::Commit::InfoService.call('jasder', 'repo_identifier', 'sha value')
# Gitea::Commit::InfoService.call('jasder', 'repo_identifier', 'sha value', token='gitea token')
def initialize(owner, repo, sha, token=nil)
@owner = owner
@repo = repo
@@ -22,7 +22,7 @@ class Gitea::Commit::InfoService < Gitea::ClientService

private
def params
Hash.new.merge(token: owner)
Hash.new.merge(token: token)
end

def url


Loading…
Cancel
Save