Skip to content
Snippets Groups Projects
Commit 20a31f42 authored by Valery Sizov's avatar Valery Sizov
Browse files

Merge branch 'update_stable_ee' into '7-13-stable-ee'

Update EE stable and (CE -> EE)



See merge request !470
parents 0a7b86f0 74993d9c
No related branches found
No related tags found
No related merge requests found
Pipeline #
Please view this file on the master branch, on stable branches it's out of date.
v 7.13.3
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
 
v 7.13.2
- Fix randomly failed spec
Loading
Loading
v7.13.3
- Merge community edition changes for version 7.13.3
- Improved validation for an approver
- Don't resend admin email to everyone if one delivery fails
- Added migration for removing of invalid approvers
 
v7.13.2
v 7.13.2
- Merge community edition changes for version 7.13.2
- Fix group web hook
 
v7.13.1
v 7.13.1
- Merge community edition changes for version 7.13.1
- Fix: "Rebase before merge" doesn't work when source branch is in the same project
 
v7.13
v 7.13
- Fix git hook validation on initial push to master branch.
- Reset approvals on push
- Fix 500 error when the source project of an MR is deleted
Loading
Loading
7.13.2-ee
\ No newline at end of file
7.13.2-ee
Loading
Loading
@@ -3,6 +3,7 @@ class Import::BitbucketController < Import::BaseController
before_action :bitbucket_auth, except: :callback
 
rescue_from OAuth::Error, with: :bitbucket_unauthorized
rescue_from Gitlab::BitbucketImport::Client::Unauthorized, with: :bitbucket_unauthorized
 
def callback
request_token = session.delete(:oauth_request_token)
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ class AdminEmailsWorker
 
def perform(recipient_id, subject, body)
recipient_list(recipient_id).pluck(:id).each do |user_id|
Notify.send_admin_notification(user_id, subject, body).deliver
Notify.delay.send_admin_notification(user_id, subject, body)
end
end
 
Loading
Loading
class RemoveInvalidApprovers < ActiveRecord::Migration
def up
execute("DELETE FROM approvers WHERE user_id = 0")
end
def down
end
end
Loading
Loading
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 20150717155058) do
ActiveRecord::Schema.define(version: 20150731200022) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Loading
Loading
module Gitlab
module BitbucketImport
class Client
class Unauthorized < StandardError; end
attr_reader :consumer, :api
 
def initialize(access_token = nil, access_token_secret = nil)
Loading
Loading
@@ -46,23 +48,23 @@ def get_token(request_token, oauth_verifier, redirect_uri)
end
 
def user
JSON.parse(api.get("/api/1.0/user").body)
JSON.parse(get("/api/1.0/user").body)
end
 
def issues(project_identifier)
JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/issues").body)
JSON.parse(get("/api/1.0/repositories/#{project_identifier}/issues").body)
end
 
def issue_comments(project_identifier, issue_id)
JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/issues/#{issue_id}/comments").body)
JSON.parse(get("/api/1.0/repositories/#{project_identifier}/issues/#{issue_id}/comments").body)
end
 
def project(project_identifier)
JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}").body)
JSON.parse(get("/api/1.0/repositories/#{project_identifier}").body)
end
 
def find_deploy_key(project_identifier, key)
JSON.parse(api.get("/api/1.0/repositories/#{project_identifier}/deploy-keys").body).find do |deploy_key|
JSON.parse(get("/api/1.0/repositories/#{project_identifier}/deploy-keys").body).find do |deploy_key|
deploy_key["key"].chomp == key.chomp
end
end
Loading
Loading
@@ -82,11 +84,18 @@ def delete_deploy_key(project_identifier, key)
end
 
def projects
JSON.parse(api.get("/api/1.0/user/repositories").body).select { |repo| repo["scm"] == "git" }
JSON.parse(get("/api/1.0/user/repositories").body).select { |repo| repo["scm"] == "git" }
end
 
private
 
def get(url)
response = api.get(url)
raise Unauthorized if (400..499).include?(response.code.to_i)
response
end
def config
Gitlab.config.omniauth.providers.find { |provider| provider.name == "bitbucket"}
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment