arduino / arduino/Arduino

Broken (unnecessarily munged) repo hyperlinks in library reference pages

Open
#11,996 0 comments 0 reactions 0 assignees View on GitHub
Component: Website Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

### Describe the problem

After adding some of my libraries to the library registry, I note that the automatically-generated library pages (example: https://docs.arduino.cc/libraries/keyhole/ ) are taking the repo URLs I supplied (in that case: https://bitbucket.org/jezhill/Keyhole ) and automatically appending `.git` to them. This leads to a potentially-invalid hyperlink.

### To reproduce

- Go to the page https://docs.arduino.cc/libraries/keyhole
- Hover over the link that says GO TO REPOSITORY.
- Note that it leads to https://bitbucket.org/jezhill/Keyhole.git
- Note that this is different from the actual library-registry entry, which is https://bitbucket.org/jezhill/Keyhole
- Click on the link.
- Note that the bitbucket webserver chokes on the modified URL (we get to a page that spins its progress-wheel indefinitely, waiting for the content to be populated).
- Try the same thing with any other arduino library whose source repo is hosted on bitbucket.

### Expected behavior

Expected behavior is to see bitbucket's web-interface version of the repo. This happens correctly if you point your browser to the original URL listed in https://github.com/arduino/library-registry/blob/main/repositories.txt (i.e. https://bitbucket.org/jezhill/Keyhole without the `.git` suffix)

### Additional context

Of course you could (rightly) argue that this *particular* problem is a bitbucket.org server issue rather than an arduino.cc issue. But (leaving aside the fact that, as a non-paying user of bitbucket, I'm not going to get the attention of their support or webmaster) the general principle remains that it's probably wiser to just _not_ automatically change the provided URL on the arduino.cc side, to avoid any such unforeseen weirdness.

Note that, as an argument to `git clone` the URL works fine both with _and_ without the suffix. This particular problem only occurs with the web interface. In any case, I don't see any advantage in adding the `.git` suffix, especially to a hyperlink that is designed for human clicking.

### Issue checklist

- [x] I searched for previous reports in [the issue tracker](https://github.com/arduino/library-registry/issues?q=)
- [x] My report contains all necessary details

Contributor guide

Open the contributing guide

Research direction

Start by comparing the repository URL in repositories.txt with the URL rendered by the library reference page at docs.arduino.cc/libraries/keyhole. Trace where the generated GO TO REPOSITORY link appends .git; done means preserving the supplied URL so Bitbucket repository links open in the web interface.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.