title

in app/serializers/import/github_failure_entity.rb [50:98]


    def title(failure)
      gh_identifiers = failure.external_identifiers

      case gh_identifiers['object_type']
      when 'pull_request', 'issue', 'label', 'milestone'
        gh_identifiers['title']
      when 'pull_request_merged_by'
        format(s_("GithubImporter|Pull request %{pull_request_iid} merger"), pull_request_iid: gh_identifiers['iid'])
      when 'pull_request_review_request'
        format(
          s_("GithubImporter|Pull request %{pull_request_iid} review request"),
          pull_request_iid: gh_identifiers['merge_request_iid']
        )
      when 'pull_request_review'
        format(s_("GithubImporter|Pull request review %{review_id}"), review_id: gh_identifiers['review_id'])
      when 'collaborator'
        gh_identifiers['login']
      when 'protected_branch'
        gh_identifiers['id']
      when 'issue_event'
        gh_identifiers['event']
      when 'release'
        gh_identifiers['tag']
      when 'note'
        format(
          s_("GithubImporter|%{noteable_type} comment %{note_id}"),
          noteable_type: gh_identifiers['noteable_type'],
          note_id: gh_identifiers['note_id']
        )
      when 'diff_note'
        format(s_("GithubImporter|Pull request review comment %{note_id}"), note_id: gh_identifiers['note_id'])
      when 'issue_attachment'
        format(s_("GithubImporter|Issue %{issue_iid} attachment"), issue_iid: gh_identifiers['noteable_iid'])
      when 'merge_request_attachment'
        format(
          s_("GithubImporter|Merge request %{merge_request_iid} attachment"),
          merge_request_iid: gh_identifiers['noteable_iid']
        )
      when 'release_attachment'
        format(s_("GithubImporter|Release %{tag} attachment"), tag: gh_identifiers['tag'])
      when 'note_attachment'
        s_('GithubImporter|Note attachment')
      when 'lfs_object'
        gh_identifiers['oid'].to_s
      else
        ''
      end
    end