Skip to content
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

Open with <IDE> x-github-client expects full-uri #33665

Closed
Red3Tango opened this issue Feb 20, 2025 · 4 comments · Fixed by #33666
Closed

Open with <IDE> x-github-client expects full-uri #33665

Red3Tango opened this issue Feb 20, 2025 · 4 comments · Fixed by #33666
Labels

Comments

@Red3Tango
Copy link

Description

When setting up a custom "Open with " in Site Admin, web_src/js/features/repo-common.ts will encode the Repo's {url} to generate the href=. GitHub Desktop uses the x-github-client handler, and does not recognize encoded URLs.

Do not think this is necessarily a bug with Gitea or GitHub Desktop, and cannot expect a conditional for every client that may be out there. Would think something like {URL} be unencoded, and leaving {url} being encoded.

Gitea Version

1.23.4

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Running gitea-1.23.4-linux-amd64 from systemd on Debian 10.

Database

MySQL/MariaDB

@wxiaoguang
Copy link
Contributor

Do you mean to use x-github-client:{url} as the "Open-with URL" and use the {url} directly without encoding?

@wxiaoguang
Copy link
Contributor

Does " Improve Open-with URL encoding #33666 " look good to you?

  • proto://a/{url} => proto://a/https://gitea
  • proto://a?link={url} => proto://a?link=https%3A%2F%2Fgitea

@Red3Tango
Copy link
Author

Red3Tango commented Feb 21, 2025

Yeah, I think that looks good. It doesn't add another 'variable', just formatting based on how the template is written (being either part of the URL itself, or Field that is passed).

wxiaoguang added a commit that referenced this issue Feb 21, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Feb 21, 2025
wxiaoguang added a commit that referenced this issue Feb 21, 2025
Backport #33666 by wxiaoguang

Fix #33665

Co-authored-by: wxiaoguang <[email protected]>
@wxiaoguang
Copy link
Contributor

1.23-nightly is ready (it is a stable release and will be 1.23.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants