Adding reviews.md template / Started fleshing out setup.py to handle errbot plugins
[margebot.git] / plugins / templates / reviews.md
1 {#- reviews.md template -#}
2 {#- ------------------- -#}
3 {#- sender: Name of sender -#}
4 {#- msg_list: Unsorted list of {'creation_time','msg'} dicts -#}
5 {%- if sender is defined -%}
6 {%- set welcome = "Hi " ~ sender ~ ": " -%}
7 {%- else -%}
8 {%- set welcome = "" %}
9 {%- endif -%}
10 {% if not msg_list %}
11 {{ welcome }}I found no open MRs for you.
12 {% else -%}
13 {{welcome}}These MRs need some attention:
14 {% for a_msg in msg_list|sort(attribute='creation_time') %}
15 - {{ a_msg['msg'] }}
16 {% endfor %}
17 {% endif %}
18 {%- if sender is not defined -%}
19 You can get an updated list with the !reviews command.
20 {%- endif -%}
21