Codeberg handler. format permalink correctly.#147
Merged
sshaw merged 2 commits intosshaw:masterfrom Aug 12, 2025
Merged
Conversation
Owner
|
Thanks for the PR! Glad to see the links are at least working 😅 This broke a test or two. Do you mind making the appropriate update to fix it? |
Author
|
@sshaw i added a fix. only one test broke for me locally, now it passes. |
sshaw
reviewed
Aug 12, 2025
| (format "%s/%s/src/%s/%s" | ||
| hostname | ||
| dirname | ||
| (or branch (concat "commit/" commit)) |
Owner
There was a problem hiding this comment.
When not using a commit branch is appended to the branch name, e.g., https://codeberg.org/martianh/fj.el/src/main/fj-transient.el#L301 -> https://codeberg.org/martianh/fj.el/src/branch/main/fj-transient.el#L305
Owner
|
Great thanks! Left a note for reference but this is good to go! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codeberg permalinks add
/commit/after/srcand before the commit hash. This PR makesgit-linkcreate correct permalinks to code references for Codeberg.Currently, if you visit a
git-linkcreated commit URL in the browser, Forgejo/Codeberg will re-write it to add the/commit/part. I'm working on an emacs client for Forgejo (https://codeberg.org/martianh/fj.el), so I can't benefit from such re-writing and needgit-linkto create the right kind of permalink.