-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the isPermaLink
attribute to guid
in RSS
#107
Conversation
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. Signed-off-by: Yarden Shoham <[email protected]>
…28860) Our `guid` is not a valid URL so according to the RSS spec the `isPermaLink` attribute needs to be set to `false`. Example: ```diff <item> <title>yardenshoham opened issue <a href="https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2">yardenshoham/test#2</a></title> <link>https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</link> <description>2#hey</description> <content:encoded><![CDATA[2#hey]]></content:encoded> <author>yardenshoham</author> - <guid>355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> + <guid isPermaLink="false">355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> <pubDate>Tue, 16 Jan 2024 18:54:36 +0000</pubDate> </item> ``` References: - https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt - Fixes #28734 - gorilla/feeds#78 - #21550 - gorilla/feeds#107 Signed-off-by: Yarden Shoham <[email protected]>
…o-gitea#28860) Our `guid` is not a valid URL so according to the RSS spec the `isPermaLink` attribute needs to be set to `false`. Example: ```diff <item> <title>yardenshoham opened issue <a href="https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2">yardenshoham/test#2</a></title> <link>https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</link> <description>2#hey</description> <content:encoded><![CDATA[2#hey]]></content:encoded> <author>yardenshoham</author> - <guid>355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> + <guid isPermaLink="false">355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> <pubDate>Tue, 16 Jan 2024 18:54:36 +0000</pubDate> </item> ``` References: - https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt - Fixes go-gitea#28734 - gorilla/feeds#78 - go-gitea#21550 - gorilla/feeds#107 Signed-off-by: Yarden Shoham <[email protected]>
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. |
I don't see how that would be possible, |
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. |
…o-gitea#28860) Our `guid` is not a valid URL so according to the RSS spec the `isPermaLink` attribute needs to be set to `false`. Example: ```diff <item> <title>yardenshoham opened issue <a href=&go-gitea#34;https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2">yardenshoham/test#2</a></title> <link>https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</link> <description>2#hey</description> <content:encoded><![CDATA[2#hey]]></content:encoded> <author>yardenshoham</author> - <guid>355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> + <guid isPermaLink="false">355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> <pubDate>Tue, 16 Jan 2024 18:54:36 +0000</pubDate> </item> ``` References: - https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt - Fixes go-gitea#28734 - gorilla/feeds#78 - go-gitea#21550 - gorilla/feeds#107 Signed-off-by: Yarden Shoham <[email protected]>
…o-gitea#28860) Our `guid` is not a valid URL so according to the RSS spec the `isPermaLink` attribute needs to be set to `false`. Example: ```diff <item> <title>yardenshoham opened issue <a href=&go-gitea#34;https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2">yardenshoham/test#2</a></title> <link>https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</link> <description>2#hey</description> <content:encoded><![CDATA[2#hey]]></content:encoded> <author>yardenshoham</author> - <guid>355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> + <guid isPermaLink="false">355: https://3000-yardenshoham-gitea-jqlxjixsez9.ws-us107.gitpod.io/yardenshoham/test/issues/2</guid> <pubDate>Tue, 16 Jan 2024 18:54:36 +0000</pubDate> </item> ``` References: - https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt - Fixes go-gitea#28734 - gorilla/feeds#78 - go-gitea#21550 - gorilla/feeds#107 Signed-off-by: Yarden Shoham <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Plan on merging and releasing as part of a new 1.x
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. |
They merged the PR we waited for. - Reference: gorilla/feeds#107 - Follows: #28860 Signed-off-by: Yarden Shoham <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/4166 This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/gorilla/feeds](https://github.com/gorilla/feeds) | require | minor | `v1.1.2` -> `v1.2.0` | --- <details> <summary>gorilla/feeds (github.com/gorilla/feeds)</summary> [Compare Source](gorilla/feeds@v1.1.2...v1.2.0) - Add the `isPermaLink` attribute to `guid` in RSS by [@​yardenshoham](https://github.com/yardenshoham) in gorilla/feeds#107 - [@​yardenshoham](https://github.com/yardenshoham) made their first contribution in gorilla/feeds#107 **Full Changelog**: gorilla/feeds@v1.1.2...v1.2.0 </details> --- 📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDkuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQwOS4xIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6WyJkZXBlbmRlbmN5LXVwZ3JhZGUiXX0=-->
What type of PR is this?
Description
Adds the optional attribute from the
guid
RSS spec: https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgtThis is a breaking change to the
RssItem
struct asGuid
is now a struct, not a string.Related Tickets & Documents
Added/updated tests?
have not been included
Run verifications and test
make verify
is passingmake test
is passing