mention_team

in lib/retrospective.rb [95:117]


  def mention_team(issue_url, team:, dry_run:)
    comment = Team::TEAM_MEMBER_FIELDS.map do |people|
      next if team[people].nil? || team[people].empty?

      [
        '*',
        *team[people].map { |person| "@#{person}" },
        "(#{people})"
      ].join(' ')
    end.compact.join("\n")

    log_info('Mention comment', comment, dry_run: dry_run)

    unless dry_run
      return if team_mention_comment_created?(issue_url: issue_url, comment_body: comment)

      write_client.post("#{issue_url}/notes", body: { body: comment })

      puts 'Created comment'
      puts ''
    end
  end