forgejo/routers/web/repo
Mathieu Fenniak eb21dd17b8 fix: loading action logs on a task that isn't fetched yet, fails when the job is fetched (#9293)
Discovered a regression caused by #9017.

Steps to reproduce:
- Disable the forgejo-runner that will pick up a workflow
- Trigger any workflow to run
- Through the Actions list, click on the new workflow that is pending a runner to fetch it
- You'll be redirected to /user/repo/actions/runs/73/jobs/0/attempt/0  (attempt = 0)
  - The UI will appear normal with the job "Waiting"...
- Startup the forgejo-runner to pick up the workflow
- The UI will begin to have errors:
    - JavaScript promise rejection: JSON.parse: unexpected keyword at line 1 column 1 of the JSON data. Open browser console to see more details. (5)

The cause is that the redirect to `/attempt/0` occurs for a job that hasn't been started, but once the job is started attempt 0 is not a valid attempt and errors will occur when polling for data.  This fix corrects the problem by redirecting to the attempt that will be present (attempt 1) when the job is fetched.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9293
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
2025-09-14 14:30:02 +02:00
..
actions fix: loading action logs on a task that isn't fetched yet, fails when the job is fetched (#9293) 2025-09-14 14:30:02 +02:00
badges
flags
setting feat: Add converting mirror repos to normal to the API (#8932) 2025-09-14 14:25:05 +02:00
action_aggregator_test.go
activity.go
attachment.go
blame.go
branch.go
card.go
cherry_pick.go
code_frequency.go
commit.go feat: add tag label to commit list view (#8759) 2025-08-06 14:47:51 +02:00
compare.go fix(ui): compare branches even with pull requests disabled (#8496) 2025-08-03 06:19:45 +02:00
contributors.go
download.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
editor.go
editor_test.go
find.go
githttp.go fix: do permission check for repository redirect 2025-08-30 09:37:34 +02:00
githttp_test.go
helper.go feat(build): improve lint-locale-usage further (#8736) 2025-08-27 23:47:34 +02:00
helper_test.go
issue.go fix(ui): show participants in mention suggestions in pr review (#8363) 2025-09-04 23:29:34 +02:00
issue_content_history.go
issue_dependency.go
issue_label.go
issue_label_test.go
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go fix: don't allow credentials in migrate/push mirror URL 2025-08-30 08:07:23 +02:00
milestone.go
packages.go
patch.go
projects.go
projects_test.go
pull.go fix(ui): show participants in mention suggestions in pr review (#8363) 2025-09-04 23:29:34 +02:00
pull_review.go
pull_review_test.go
recent_commits.go
release.go
release_test.go
render.go
repo.go
search.go fix(code-search): fix broken pagination. (#9000) 2025-08-23 13:06:41 +02:00
topic.go
treelist.go git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
view.go Update module code.forgejo.org/forgejo/runner/v9 to v11 (forgejo) (#9218) 2025-09-10 22:02:55 +02:00
view_test.go
wiki.go
wiki_test.go