Class: Apadmi::Grout::FlagMessages

Inherits:
Struct
  • Object
show all
Defined in:
lib/apadmi/grout/models/flag_messages.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#declined_prs_flag_msgObject

Returns the value of attribute declined_prs_flag_msg

Returns:

  • (Object)

    the current value of declined_prs_flag_msg



5
6
7
# File 'lib/apadmi/grout/models/flag_messages.rb', line 5

def declined_prs_flag_msg
  @declined_prs_flag_msg
end

#no_merged_prs_flag_msgObject

Returns the value of attribute no_merged_prs_flag_msg

Returns:

  • (Object)

    the current value of no_merged_prs_flag_msg



5
6
7
# File 'lib/apadmi/grout/models/flag_messages.rb', line 5

def no_merged_prs_flag_msg
  @no_merged_prs_flag_msg
end

#no_prs_flag_msgObject

Returns the value of attribute no_prs_flag_msg

Returns:

  • (Object)

    the current value of no_prs_flag_msg



5
6
7
# File 'lib/apadmi/grout/models/flag_messages.rb', line 5

def no_prs_flag_msg
  @no_prs_flag_msg
end

#open_prs_flag_msgObject

Returns the value of attribute open_prs_flag_msg

Returns:

  • (Object)

    the current value of open_prs_flag_msg



5
6
7
# File 'lib/apadmi/grout/models/flag_messages.rb', line 5

def open_prs_flag_msg
  @open_prs_flag_msg
end

Class Method Details

.default(status) ⇒ Apadmi::Grout::FlagMessages

Get default flag messages

Parameters:

  • status (String)

    status ticket will be moving to

Returns:



14
15
16
17
18
19
20
21
22
# File 'lib/apadmi/grout/models/flag_messages.rb', line 14

def self.default(status)
  FlagMessages.new(
    "REASON FOR FLAG: Check this ticket - it was put in #{status} but has no PRs connected to it. CI still moved it. " \
    "(WARNING: this may cause the `fix_versions` to be incorrect)",
    "REASON FOR FLAG: Check this ticket - it was put in #{status} but has no MERGED PRs and at least one OPEN PR",
    "REASON FOR FLAG: Check this ticket - it was put in #{status} but has only DECLINED PRs",
    "REASON FOR FLAG: Check this ticket - it was put in #{status} but has no MERGED PRs"
  )
end