Skip to content

Commit

Permalink
jipstatus: do not hardcode projects.linaro.org
Browse files Browse the repository at this point in the history
In the output, we create HTTP links to each cards, since we support
multiple Jira server, let's use jira.client_info() which returns the
actual URL in use.

Signed-off-by: Nicolas Dechesne <[email protected]>
  • Loading branch information
ndechesne authored and jbech-linaro committed Aug 2, 2021
1 parent 459f9e6 commit ab4ed7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jipstatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def initialize_logger(args):
<li>Past</li>
<ul>
{%- endif %}
<li>[<a href="https://projects.linaro.org/browse/{{issue['issue']}}">{{issue['issue']}}</a>]{% if issue['components'] |length > 0 %} [{{issue['components']|join(',')}}]{% endif %} {{issue['summary']}} {% if issue['resolution'] %} - was {{issue['resolution']|lower}}{% endif %}</li>
<li>[<a href="{{url}}/browse/{{issue['issue']}}">{{issue['issue']}}</a>]{% if issue['components'] |length > 0 %} [{{issue['components']|join(',')}}]{% endif %} {{issue['summary']}} {% if issue['resolution'] %} - was {{issue['resolution']|lower}}{% endif %}</li>
{%- for c in issue['comments'] %}
{%- if loop.index == 1 %}
<ul>
Expand All @@ -232,7 +232,7 @@ def initialize_logger(args):
<li>Ongoing</li>
<ul>
{%- endif %}
<li>[<a href="https://projects.linaro.org/browse/{{issue['issue']}}">{{issue['issue']}}</a>]{% if issue['components'] |length > 0 %} [{{issue['components']|join(',')}}]{% endif %} {{issue['summary']}}</li>
<li>[<a href="{{url}}/browse/{{issue['issue']}}">{{issue['issue']}}</a>]{% if issue['components'] |length > 0 %} [{{issue['components']|join(',')}}]{% endif %} {{issue['summary']}}</li>
{%- if loop.index == loop.length %}
</ul>
{%- endif %}
Expand Down Expand Up @@ -271,12 +271,12 @@ def main(argv):
assignees.sort(key='Unassigned'.__eq__)

template = Template(output)
print(template.render(assignees=assignees, updates=updates, pendings=pendings))
print(template.render(assignees=assignees, updates=updates, pendings=pendings, url=jira.client_info()))

if cfg.args.html:
f = open(cfg.args.html, 'w')
template = Template(output_html)
f.write(template.render(assignees=assignees, updates=updates, pendings=pendings))
f.write(template.render(assignees=assignees, updates=updates, pendings=pendings, url=jira.client_info()))
f.close()

if __name__ == "__main__":
Expand Down

0 comments on commit ab4ed7d

Please sign in to comment.