This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 93954663 authored by gfyoung's avatar gfyoung
Browse files

Enable more frozen string in app/services/**/*.rb

Partially addresses #47424.
parent 73a3c5fa8707
# frozen_string_literal: true
module Lfs
# Usage: Calling `new_file` check to see if a file should be in LFS and
# return a transformed result with `content` and `encoding` to commit.
......
# frozen_string_literal: true
module Lfs
class LockFileService < BaseService
def execute
......
# frozen_string_literal: true
module Lfs
class LocksFinderService < BaseService
def execute
......
# frozen_string_literal: true
module Lfs
class UnlockFileService < BaseService
def execute
......
# frozen_string_literal: true
module Mattermost
class CreateTeamService < ::BaseService
def initialize(group, current_user)
......
# frozen_string_literal: true
module Members
class ApproveAccessRequestService < Members::BaseService
def execute(access_requester, skip_authorization: false, skip_log_audit_event: false)
......
# frozen_string_literal: true
module Members
class BaseService < ::BaseService
# current_user - The user that performs the action
......
# frozen_string_literal: true
module Members
class CreateService < Members::BaseService
DEFAULT_LIMIT = 100
......
# frozen_string_literal: true
module Members
class DestroyService < Members::BaseService
def execute(member, skip_authorization: false)
......
# frozen_string_literal: true
module Members
class RequestAccessService < Members::BaseService
def execute(source)
......
# frozen_string_literal: true
module Members
class UpdateService < Members::BaseService
# returns the updated member
......
# frozen_string_literal: true
module MergeRequests
class AddTodoWhenBuildFailsService < MergeRequests::BaseService
# Adds a todo to the parent merge_request when a CI build fails
......
# frozen_string_literal: true
module MergeRequests
class AssignIssuesService < BaseService
def assignable_issues
......
# frozen_string_literal: true
module MergeRequests
class BaseService < ::IssuableBaseService
def create_note(merge_request, state = merge_request.state)
......
# frozen_string_literal: true
module MergeRequests
class BuildService < MergeRequests::BaseService
include Gitlab::Utils::StrongMemoize
......@@ -140,7 +142,8 @@ def append_closes_description
closes_issue = "Closes #{issue.to_reference}"
if description.present?
merge_request.description += closes_issue.prepend("\n\n")
descr_parts = [merge_request.description, closes_issue]
merge_request.description = descr_parts.join("\n\n")
else
merge_request.description = closes_issue
end
......@@ -164,9 +167,11 @@ def assign_title_from_issue
return if merge_request.title.present?
if issue_iid.present?
merge_request.title = "Resolve #{issue.to_reference}"
title_parts = ["Resolve #{issue.to_reference}"]
branch_title = source_branch.downcase.remove(issue_iid.downcase).titleize.humanize
merge_request.title += " \"#{branch_title}\"" if branch_title.present?
title_parts << "\"#{branch_title}\"" if branch_title.present?
merge_request.title = title_parts.join(' ')
end
end
......
# frozen_string_literal: true
module MergeRequests
class CloseService < MergeRequests::BaseService
def execute(merge_request, commit = nil)
......
# frozen_string_literal: true
module MergeRequests
module Conflicts
class BaseService
......
# frozen_string_literal: true
module MergeRequests
module Conflicts
class ListService < MergeRequests::Conflicts::BaseService
......
# frozen_string_literal: true
module MergeRequests
module Conflicts
class ResolveService < MergeRequests::Conflicts::BaseService
......
# frozen_string_literal: true
module MergeRequests
class CreateFromIssueService < MergeRequests::CreateService
def initialize(project, user, params)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment