bitcrowd / tickety-tick

A browser extension that helps you name branches and write better commit messages
MIT License
57 stars 10 forks source link

GitLab integration is broken #270

Closed taig closed 3 years ago

taig commented 3 years ago

Hey bitcrowd πŸ‘‹

Looks like GitLab removed the js-issuable-app-initial-data id from the issue page causing tickety-tick to fail with the error below:

Tickety-Tick revision: fda1749a21ac75aa115d6245fac21e63570b16c3

Cannot read property 'innerHTML' of null
    at scan (webpack:///src/core/adapters/gitlab.js:13:20)
    at attempt (webpack:///src/core/search.js:10:26)
    at search (webpack:///src/core/search.js:28:47)
    at search (webpack:///src/core/search.js:28:25)
    at browser.runtime.onMessage.addListener( (webpack:///src/content/index.js:8:13)
    at wrappedSendResponse (webpack:///node_modules/webextension-polyfill/dist/browser-polyfill.js:1072:21)
taig commented 3 years ago

From what I see in the GitLab page source it might be sufficient to change js-issuable-app-initial-data to js-issuable-app

klappradla commented 3 years ago

Many thanks for reaching out @Taig πŸ’š

Are you experiencing this on gitlab.com or on a self-hosted instance?

Also a huge thanks for already suggesting a potential solution πŸ‘. Would you be up for packaging this into a PR? We're always here for support on this of course 🀜 πŸ€›

Tiny disclaimer: we need to support both, gitlab.com as well as self hosted versions. So it may be necessary to stay "backwards compatible" with the old HTML structure here.

taig commented 3 years ago

I'll submit a PR in the next days. I don't know much about JS, but the README looks helpful enough for me to squeeze out a minor fix πŸ™

klappradla commented 3 years ago

FYI @Taig πŸ‘‹, I just released a new version of the extension (in fact two because Mozilla had an issue with the first...) and it should be hitting your browser soonish 🀞

If you don't want to wait, you can grab the release directly from releases. There's a self signed version for Firefox and a zip file for Chrome.

Thanks again for you contribution πŸ’š

taig commented 3 years ago

Thank you very much, can't wait for the update ☺️