rybak / copy-commit-reference-userscript

Userscripts to add a "Copy commit reference" button to commit pages of Git hosting providers.
https://greasyfork.org/en/scripts?set=588773
GNU Affero General Public License v3.0
2 stars 0 forks source link

Add support for Bitbucket Server #1

Closed rybak closed 1 year ago

rybak commented 1 year ago

Overview

Is UI of this hosting provider a SPA?

No.

Public instances

There are none, as far as I am aware.

Example URLs for testing

N/A

Notes

Alpha version has a bunch of leftover code from bitbucket-copy-commit-reference.user.js of Atlassian Tweaks. Most of this leftover code is specific to supporting Bitbucket Server and Bitbucket Cloud.

We shall expand class BitbucketServer to fully implement support Bitbucket Server by reusing this leftover code.

Screenshots

v0.10-alpha, as of 2023-08-21. The button is on the left, near the permalink to the commit. 2023-08-21 bitbucket server screenshot

v0.17-alpha, as of 2023-08-25. The button is moved to the right, the checkmark tooltip is clipping out of page on the right. 2023-08-25 bitbucket server screenshot

v2.0, as of 2023-09-14. The tooltip is moved to the left and is now styled as some other native tooltips. 2023-09-14 bitbucket server screenshot

rybak commented 1 year ago

During overhaul of the on-the-fly page loads, I found a bug. It should be fixed by the time this issue lands in main, but I'll record my notes about it here for future reference.

False-positives during navigation of a repository called "commit" are causing duplication. For example:

  1. Go to https://github.com/enkidevs/commit/commit/7e99650686f6bbb0dbd37e26ce844967ef128d7d
  2. Click through several tabs: "Issues", "Actions", "Projects", etc
  3. Go to: "Code" > "150,194 commits" (under the green button for cloning)
  4. Click on some commit
  5. Count the number of "Copy commit reference" links