update_issue

in lib/retrospective.rb [42:62]


  def update_issue(team:, release:, dry_run:)
    template = DescriptionTemplate.new(team, release, api_client: read_client)
    result = template.result_with_hash(updating_description: true, query_all_groups: team.query_all_groups?)

    log_info("Issue #{template.current_issue_url}", result, verb: 'update', dry_run: dry_run)

    unless dry_run
      write_client.put(template.current_api_path, body: { description: result })

      puts "Updated issue #{template.current_issue_url}"
      puts ''
    end

    mention_team(template.current_api_path, team: team, dry_run: dry_run) if team.mention_team

    if team.create_individual_discussions
      create_individual_discussions(template.current_api_path, team: team,
                                                               dry_run: dry_run)
    end
  end