forgejo/services
Earl Warren c922ac5f38 fix: de-duplicate Forgejo Actions job names when needed (#8864)
The status of two jobs by the same name shadow each other, they need to be distinct. If two jobs by the same name are found, they are made distinct by adding a `-<occurence number>` suffix.

Resolves forgejo/forgejo#8648

For a given workflow, `jobparser.Parse` will generate one "single" (as opposed to a workflow that can be interpreted to generate multiple jobs)  workflow for each job and then insert them (marshalled as yaml) in the database.

e3bfa5133f/models/actions/run.go (L237-L260)

The name associated with this single workflow is what the runner will receive and it is what will be used to associate the job status with a commit.

Resolves forgejo/forgejo#8648

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.

### Documentation

- [x] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/8864): <!--number 8864 --><!--line 0 --><!--description ZGUtZHVwbGljYXRlIEZvcmdlam8gQWN0aW9ucyBqb2IgbmFtZXMgd2hlbiBuZWVkZWQ=-->de-duplicate Forgejo Actions job names when needed<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8864
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-08-13 06:52:44 +02:00
..
actions fix: de-duplicate Forgejo Actions job names when needed (#8864) 2025-08-13 06:52:44 +02:00
agit fix: correctly mark reviews as stale for AGit PRs (#8450) 2025-07-09 07:38:00 +02:00
asymkey feat: consider WebAuthn & SSH for instance signing (#7693) 2025-04-29 10:34:07 +00:00
attachment fix: allow instance API URLs in release assets (#7644) 2025-06-09 10:01:59 +02:00
auth feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
automerge fix: check PR reference on base repository (#8431) 2025-07-06 14:23:47 +02:00
context chore: move template context (#8663) 2025-07-25 11:55:15 +02:00
contexttest Replace the 'relative-time' element scripting with custom, translatable rewrite (#6154) 2025-05-03 14:11:01 +00:00
convert Add support for migrating from Pagure (#8513) 2025-08-11 16:56:26 +02:00
cron feat: add configurable timeout for automatically removing resolved reports (#7940) 2025-07-28 14:52:13 +02:00
doctor chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
externalaccount chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
f3 Update module code.forgejo.org/f3/gof3/v3 to v3.11.0 (forgejo) (#8056) 2025-06-03 14:24:57 +02:00
federation Sent user activities to distant federated server (#8792) 2025-08-06 16:16:13 +02:00
feed fix: PR review dismissals were not appearing in activity feed (#8853) 2025-08-11 07:39:17 +02:00
forgejo chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
forms feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
gitdiff fix: expanding exactly 20 lines between diff sections leaves visual artifact (#8519) 2025-07-16 08:04:38 +02:00
indexer chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue fix: add .forgejo/CODEOWNERS support (#8773) 2025-08-05 17:00:35 +02:00
lfs chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
mailer fix(email): actions notification template confuses branch with PR (#8448) 2025-07-09 09:43:33 +02:00
markup chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
migrations Add support for migrating from Pagure (#8513) 2025-08-11 16:56:26 +02:00
mirror feat: add configuration to only push mirror selected branches (#7823) 2025-07-12 00:39:35 +02:00
moderation feat: add configurable timeout for automatically removing resolved reports (#7940) 2025-07-28 14:52:13 +02:00
notify better comments and variable names for ActionRunNowDone (#7697) 2025-04-28 06:37:08 +00:00
org chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
packages several fixes of ALT Package registry (#8475) 2025-07-10 17:12:07 +02:00
pull fix: prevent pull requests from being merged multiple times 2025-08-11 12:55:25 +02:00
release chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
remote chore: tune down remote user promotion debug message shown as error (#7687) 2025-04-27 20:50:48 +00:00
repository git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
secrets feat: migrate action secrets to keying to store them more securely (#8692) 2025-07-29 01:03:36 +02:00
shared/automerge fix: do not ignore automerge while a PR is checking for conflicts (#8189) 2025-06-17 10:58:07 +02:00
task chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
uinotification chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
webhook [gitea] week 2025-19 cherry pick (gitea/main -> forgejo) (#7909) 2025-06-27 13:59:07 +02:00
wiki chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00