Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bug fixes #10516

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/channels/graphql_channel.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# This is based on https://github.com/rmosolgo/graphql-ruby/blob/v1.11.8/lib/graphql/subscriptions/action_cable_subscriptions.rb#L19-L82
# modified to work with our own ActionCableLink client
# modified to work with our own ActionCableLink client.

class GraphqlChannel < ApplicationCable::Channel # rubocop:disable Gitlab/NamespacedClass
def subscribed
Expand Down Expand Up @@ -44,11 +44,11 @@ def unsubscribed

private

# When modifying the context, also update GraphqlController#context if needed
# so that we have similar context when executing queries, mutations, and subscriptions
# When modifying the context, also update GraphqlController context if needed
# so that we have similar context when executing queries, mutations, and subscriptions.
#
# Objects added to the context may also need to be reloaded in
# `Subscriptions::BaseSubscription` so that they are not stale
# Objects added to the context may also need to be reloaded in
# `Subscriptions::BaseSubscription` so that they are not stale.
def context
# is_sessionless_user is always false because we only support cookie auth in ActionCable
{ channel: self, current_user: current_user, is_sessionless_user: false }
Expand Down
2 changes: 1 addition & 1 deletion app/models/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Integration < ApplicationRecord
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/345677
PROJECT_SPECIFIC_INTEGRATION_NAMES = %w[
jenkins shimo
].freeze
].freeze

# Fake integrations to help with local development.
DEV_INTEGRATION_NAMES = %w[
Expand Down
2 changes: 1 addition & 1 deletion app/models/snippet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def content_html_invalidated?
current_value = ActiveSupport::NumberHelper.number_to_human_size(data[:value].size)
max_size = ActiveSupport::NumberHelper.number_to_human_size(Gitlab::CurrentSettings.snippet_size_limit)

_("is too long (%{current_value}). The maximum size is %{max_size}.") % { current_value: current_value, max_size: max_size }
_("is too long (%{current_value}), the maximum size is %{max_size}.") % { current_value: current_value, max_size: max_size }
end
},
if: :content_changed?
Expand Down
2 changes: 1 addition & 1 deletion lib/api/commits.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def user_access

def authorize_push_to_branch!(branch)
unless user_access.can_push_to_branch?(branch)
forbidden!("You are not allowed to push into this branch")
forbidden!("You are not allowed to push into this branch!")
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/api/projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def delete_project(user_project)
::Projects::DestroyService.new(user_project, current_user, {}).async_execute
end

#this has been accepted
accepted!
end

Expand Down
9 changes: 7 additions & 2 deletions spec/models/releases/link_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,23 @@

it { is_expected.to be_truthy }


artifacts = 'https://google.com/-/jobs/140463678/artifacts/download'

context 'when link does not include project web url' do
let(:url) { 'https://google.com/-/jobs/140463678/artifacts/download' }
let(:url) { artifacts }

it { is_expected.to be_falsy }
end
end



describe '#external?' do
subject { link.external? }

let(:link) { build(:release_link, release: release, url: url) }
let(:url) { 'https://google.com/-/jobs/140463678/artifacts/download' }
let(:url) { artifacts }

it { is_expected.to be_truthy }
end
Expand Down
2 changes: 1 addition & 1 deletion spec/rack_servers/puma_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

def wait_puma_boot!(master_pid, ready_file)
# We have seen the boot timeout after 2 minutes in CI so let's set it to 5 minutes.
timeout = 5 * 60
timeout = 300
timeout.times do
return if File.exist?(ready_file)

Expand Down