Skip to content

Commit

Permalink
Send repo URL as context variable
Browse files Browse the repository at this point in the history
Provide `stable-rc` repo URL as context variable
to `stable_rc_revision_description` template.
It will enable us to re-use the same template to
get revision description information for
a different tree such as `omap`.

Signed-off-by: Jeny Sadadia <[email protected]>
  • Loading branch information
Jeny Sadadia committed Sep 23, 2024
1 parent 788baaa commit ef4b5c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion kcidb/monitor/subscriptions/linux_stable_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ def match_revision(revision):
"Shreeya Patel <[email protected]>"],
body='{% include "stable_rc_revision_description.txt.j2" %}',
cc=["KernelCI Results Staging <[email protected]>"],
due=datetime.now(timezone.utc) + timedelta(hours=3)
due=datetime.now(timezone.utc) + timedelta(hours=3),
context={'main_repo_url': repo_url}
),)
7 changes: 2 additions & 5 deletions kcidb/templates/stable_rc_revision_description.txt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,12 @@ REVISION
{% if revision.git_commit_hash %}
{{- " hash: " + revision.git_commit_hash }}
{% endif %}
{# The stable-rc repo's URL #}
{% set stable_rc_repo = 'https://git.kernel.org/pub/scm/linux/' +
'kernel/git/stable/linux-stable-rc.git' %}
{# List of other repo's URLs #}
{% set other_repos = revision.repo_branch_checkouts.keys() |
reject('==', stable_rc_repo) | reject("none") | list %}
reject('==', main_repo_url) | reject("none") | list %}
Checked out from
{{- "\n " +
(([stable_rc_repo] + (revision.repo_branch_checkouts[stable_rc_repo] | list)) |
(([main_repo_url] + (revision.repo_branch_checkouts[main_repo_url] | list)) |
reject("none") | join(" ")) }}
{% if other_repos %}
Also checked out from
Expand Down

0 comments on commit ef4b5c1

Please sign in to comment.