Feature: Add button to re-run failed jobs in Actions (#36924)

Fixes #35997

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
bircni
2026-03-21 22:27:13 +01:00
committed by GitHub
parent ee009ebec8
commit b22123ef86
12 changed files with 332 additions and 45 deletions

View File

@@ -147,6 +147,7 @@ export default defineComponent({
canCancel: false,
canApprove: false,
canRerun: false,
canRerunFailed: false,
canDeleteArtifact: false,
done: false,
workflowID: '',
@@ -512,9 +513,24 @@ export default defineComponent({
<button class="ui basic small compact button red" @click="cancelRun()" v-else-if="run.canCancel">
{{ locale.cancel }}
</button>
<button class="ui basic small compact button link-action" :data-url="`${run.link}/rerun`" v-else-if="run.canRerun">
{{ locale.rerun_all }}
</button>
<template v-else-if="run.canRerun">
<div v-if="run.canRerunFailed" class="ui small compact buttons">
<button class="ui basic small compact button link-action" :data-url="`${run.link}/rerun-failed`">
{{ locale.rerun_failed }}
</button>
<div class="ui basic small compact dropdown icon button">
<SvgIcon name="octicon-triangle-down" :size="14"/>
<div class="menu">
<div class="item link-action" :data-url="`${run.link}/rerun`">
{{ locale.rerun_all }}
</div>
</div>
</div>
</div>
<button v-else class="ui basic small compact button link-action" :data-url="`${run.link}/rerun`">
{{ locale.rerun_all }}
</button>
</template>
</div>
</div>
<div class="action-commit-summary">

View File

@@ -19,6 +19,7 @@ export function initRepositoryActionView() {
cancel: el.getAttribute('data-locale-cancel'),
rerun: el.getAttribute('data-locale-rerun'),
rerun_all: el.getAttribute('data-locale-rerun-all'),
rerun_failed: el.getAttribute('data-locale-rerun-failed'),
scheduled: el.getAttribute('data-locale-runs-scheduled'),
commit: el.getAttribute('data-locale-runs-commit'),
pushedBy: el.getAttribute('data-locale-runs-pushed-by'),