forgejo/routers/web/feed
xrstf 995244895a fix: use an absolute URL for compare links in atom feed (#10933)
This PR changes the URL format for `/compare/` links in the RSS/Atom feeds to include the full domain. This makes the links consistent with all other URLs in the feeds.

Fixes #10168.

I tested this on a local Forgejo build with a sample org and a dummy repository as per the original issue. I then fetched the feed to check:

```bash
 $ curl http://localhost:3000/helloworld.atom | grep compare
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4194    0  4194    0     0   297k          <id>10: ed4090ecc2...412413fd40</id>
0 --    <link href="ed4090ecc2...412413fd40" rel="alternate"></link>
```

## Checklist

### AI Disclosure

I used AI to

* ask it how to run a single integration test locally because I didn't know about `make test-sqlite#XXX`.

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

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

### Release notes

- [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [x] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

*The decision if the pull request will be shown in the release notes is up to the mergers / release team.*

The content of the `release-notes/<pull request number>.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10933
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: xrstf <git@xrstf.de>
Co-committed-by: xrstf <git@xrstf.de>
2026-02-01 10:00:21 +01:00
..
branch.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
convert.go fix: use an absolute URL for compare links in atom feed (#10933) 2026-02-01 10:00:21 +01:00
file.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
profile.go chore: Remove IsDeleted from action (activity) table (#9829) 2025-11-08 04:20:05 +01:00
release.go fix: correct release link in feed (#8802) 2025-08-06 17:51:36 +02:00
render.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00