Skip to content

Add source diff links for non-GitHub forges#533

Open
KiaraGrouwstra wants to merge 1 commit into
nix-community:mainfrom
KiaraGrouwstra:forge-compare-urls
Open

Add source diff links for non-GitHub forges#533
KiaraGrouwstra wants to merge 1 commit into
nix-community:mainfrom
KiaraGrouwstra:forge-compare-urls

Conversation

@KiaraGrouwstra

Copy link
Copy Markdown

Previously, compare URLs in PR descriptions only worked for GitHub-hosted sources. Add a Forge module that parses source URLs and generates compare links for GitLab (including self-hosted), Codeberg/Gitea, and SourceHut.

The GitHub compare URL path (via GH.compareUrl using the GitHub API) is tried first; Forge.compareUrl is used as a pure fallback for all forges. The link text is generalized from "on GitHub" to "upstream".

closes #516.

disclaimer i used a coding agent in the creation of this patch.

Previously, compare URLs in PR descriptions only worked for GitHub-hosted
sources. Add a Forge module that parses source URLs and generates compare
links for GitLab (including self-hosted), Codeberg/Gitea, and SourceHut.

The GitHub compare URL path (via GH.compareUrl using the GitHub API) is
tried first; Forge.compareUrl is used as a pure fallback for all forges.
The link text is generalized from "on GitHub" to "upstream".
@rhendric

Copy link
Copy Markdown
Member

There are quite a few issues with this code, but I don't know whether, if I were to write a review, I would be helping a human to learn Haskell (possibly worth my time) or giving a human some instructions that they would then feed to a coding agent to generate the next iteration of this PR (absolutely not worth my time).

But I would not merge this as-is.

@KiaraGrouwstra

Copy link
Copy Markdown
Author

thanks for checking with me. to answer your question, it's thru haskell that i got into nix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PR descriptions link to update's source diff

2 participants