Skip to content

Commit

Permalink
✨ add auto rebase timeline event
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Aug 18, 2024
1 parent 6e3d905 commit 971e9af
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author : yanyongyu
* @Date : 2022-09-17 09:17:06
* @LastEditors : yanyongyu
* @LastEditTime : 2024-05-16 17:49:48
* @LastEditTime : 2024-08-18 17:46:26
* @Description : None
* @GitHub : https://github.com/yanyongyu
-->
Expand All @@ -12,6 +12,7 @@
{% from "components/timeline/assigned.html.jinja" import assigned %}
{% from "components/timeline/auto-merge-disabled.html.jinja" import auto_merge_disabled %}
{% from "components/timeline/auto-merge-enabled.html.jinja" import auto_merge_enabled %}
{% from "components/timeline/auto-rebase-enabled.html.jinja" import auto_rebase_enabled %}
{% from "components/timeline/auto-squash-enabled.html.jinja" import auto_squash_enabled %}
{% from "components/timeline/automatic-base-change-succeeded.html.jinja" import automatic_base_change_succeeded %}
{% from "components/timeline/base-ref-changed.html.jinja" import base_ref_changed %}
Expand Down Expand Up @@ -94,6 +95,10 @@ highlight_comment: int | None
{{ auto_merge_enabled(
event.actor, event.actor_avatar, event.created_at
) }}
{% elif event.event == "auto_rebase_enabled" %}
{{ auto_rebase_enabled(
event.actor, event.actor_avatar, event.created_at
) }}
{% elif event.event == "auto_squash_enabled" %}
{{ auto_squash_enabled(
event.actor, event.actor_avatar, event.created_at
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
* @Author : yanyongyu
* @Date : 2024-08-18 17:44:44
* @LastEditors : yanyongyu
* @LastEditTime : 2024-08-18 17:44:45
* @Description : None
* @GitHub : https://github.com/yanyongyu
-->

{% from "icons/pr.html.jinja" import octicon_pr %}

{#
actor: str
actor_avatar: str
created_at: datetime
#}
{% macro auto_rebase_enabled(actor, actor_avatar, created_at) %}
<div class="TimelineItem">
<div class="TimelineItem-badge">
{{ octicon_pr() }}
</div>
<div class="TimelineItem-body">
<a class="d-inline-block">
<img
class="avatar avatar-user"
height="20"
width="20"
src="{{ actor_avatar }}"
/>
</a>
<a class="author Link--primary text-bold">
{{ actor|escape }}
</a>
enabled auto-merge (rebase)
<a class="Link--secondary">{{ created_at|relative_time }}</a>
</div>
</div>
{% endmacro %}

0 comments on commit 971e9af

Please sign in to comment.