Browse Source

Merge branch 'feature/pull_conflict_files' into dev_educoder

pull/141/head
jasder 5 years ago
parent
commit
85a37fdbcc
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/models/gitea/pull.rb
  2. +1
    -1
      app/models/pull_request.rb

+ 1
- 1
app/models/gitea/pull.rb View File

@@ -39,6 +39,6 @@ class Gitea::Pull < Gitea::Base

serialize :conflicted_files, Array

belongs_to :pull_request, class_name: '::PullRequest', foreign_key: :id, primary_key: :gitea_number, optional: true
belongs_to :pull_request, class_name: '::PullRequest', foreign_key: :id, primary_key: :gitea_id, optional: true

end

+ 1
- 1
app/models/pull_request.rb View File

@@ -37,7 +37,7 @@ class PullRequest < ApplicationRecord
has_many :pull_request_tags, foreign_key: :pull_request_id
has_many :project_trends, as: :trend, dependent: :destroy
has_many :attachments, as: :container, dependent: :destroy
has_one :gitea_pull, foreign_key: :id, primary_key: :gitea_number, class_name: 'Gitea::Pull'
has_one :gitea_pull, foreign_key: :id, primary_key: :gitea_id, class_name: 'Gitea::Pull'

scope :merged_and_closed, ->{where.not(status: 0)}
scope :opening, -> {where(status: 0)}


Loading…
Cancel
Save