feeds icon indicating copy to clipboard operation
feeds copied to clipboard

Add the `isPermaLink` attribute to `guid` in RSS

Open yardenshoham opened this issue 2 years ago • 3 comments

What type of PR is this?

  • [ ] Refactor
  • [X] Feature
  • [ ] Bug Fix
  • [ ] Optimization
  • [ ] Documentation Update
  • [ ] Go Version Update
  • [ ] Dependency Update

Description

Adds the optional attribute from the guid RSS spec: https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt

This is a breaking change to the RssItem struct as Guid is now a struct, not a string.

Related Tickets & Documents

  • Related Issue https://github.com/go-gitea/gitea/issues/28734
  • Closes #78
  • Closes #109

Added/updated tests?

  • [X] Yes
  • [ ] No, and this is why: please replace this line with details on why tests have not been included
  • [ ] I need help with writing tests

Run verifications and test

  • [X] make verify is passing
  • [X] make test is passing

yardenshoham avatar Jan 10 '24 07:01 yardenshoham

Is there any way we could add this as a new property instead? I'd prefer to not introduce a breaking change if we can avoid it here.

AlexVulaj avatar Jan 22 '24 03:01 AlexVulaj

I don't see how that would be possible, RssItem is serialized directly to XML so it would have to be a bigger change

yardenshoham avatar Jan 22 '24 06:01 yardenshoham

From what I read - the ask for this change is because some of the feeds generated by other providers doesn't meet the RSS 2.0 spec. Is there another spec that this library explicitly supports which this feature would fit under?

I'm less concerned about a breaking change and more concerned about if we're not meeting a spec. I think there's a case for if this is in one of the spec we explicitly support but we're not supporting it, that is a strong argument for a breaking change imho.

jaitaiwan avatar Jan 23 '24 04:01 jaitaiwan

It appears there's no automated tests as a part of the CI. I'll test manually before merge and update if there are any test failures.

jaitaiwan avatar Jun 17 '24 09:06 jaitaiwan