[ADD] runbot_merge: display required statuses after merge

Github makes it painfully difficult to access the statuses (especially
their URL / related build) once a PR has been merged, as it's
necessary to find the last non-staging commit mention / update in
order to find its statuses checkbox thingie, open that, and access the
statuses.

The mergebot has all the links, so it can just display them in the
merged mode as well rather than only display them in open mode. That
way even on a merged PR the statuses are just two clicks away.

Fixes #873
This commit is contained in:
Xavier Morel 2024-05-30 15:28:25 +02:00
parent 67f1c1e288
commit 68cfeddaed

View File

@ -321,6 +321,15 @@
<t t-if="merged_head">
at <a t-attf-href="https://github.com/{{pr.repository.name}}/commit/{{merged_head}}"><t t-esc="merged_head"/></a>
</t>
<p>Statuses:</p>
<ul>
<t t-foreach="pr.repository.status_ids._for_pr(pr)" t-as="ci">
<t t-set="st" t-value="statuses.get(ci.context.strip())"/>
<li t-if="st">
<a t-att-href="st.get('target_url') if st else None"><t t-esc="ci.context.strip()"/></a><t t-if="st and st.get('description')">: <t t-esc="st['description']"/></t>
</li>
</t>
</ul>
<t t-set="linked_prs" t-value="pr._linked_prs"/>
<div t-if="linked_prs">