Replace index with id in actions routes (#36842)

This PR migrates the web Actions run/job routes from index-based
`runIndex` or `jobIndex` to database IDs.

**⚠️ BREAKING ⚠️**: Existing saved links/bookmarks that use the old
index-based URLs will no longer resolve after this change.

Improvements of this change:
- Previously, `jobIndex` depended on list order, making it hard to
locate a specific job. Using `jobID` provides stable addressing.
- Web routes now align with API, which already use IDs.
- Behavior is closer to GitHub, which exposes run/job IDs in URLs.
- Provides a cleaner base for future features without relying on list
order.
- #36388 this PR improves the support for reusable workflows. If a job
uses a reusable workflow, it may contain multiple child jobs, which
makes relying on job index to locate a job much more complicated

---------

Signed-off-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Zettat123
2026-03-10 15:14:48 -06:00
committed by GitHub
parent 6e8f78ae27
commit 385994295d
33 changed files with 713 additions and 228 deletions
+2 -2
View File
@@ -3,8 +3,8 @@
<div class="page-content repository">
{{template "repo/header" .}}
{{template "repo/actions/view_component" (dict
"RunIndex" .RunIndex
"JobIndex" .JobIndex
"RunID" .RunID
"JobID" .JobID
"ActionsURL" .ActionsURL
)}}
</div>
+2 -2
View File
@@ -1,6 +1,6 @@
<div id="repo-action-view"
data-run-index="{{.RunIndex}}"
data-job-index="{{.JobIndex}}"
data-run-id="{{.RunID}}"
data-job-id="{{.JobID}}"
data-actions-url="{{.ActionsURL}}"
data-locale-approve="{{ctx.Locale.Tr "repo.diff.review.approve"}}"