dragouf / Stash-Reviewers-Chrome-Extension

This chrome/firefox extension allow to define groups of reviewers in Atlassian Stash/Bitbucket to bulk add them when creating or updating pull request + other features
MIT License
88 stars 34 forks source link

PR table isn't formatting properly #55

Closed cnnranderson closed 6 years ago

cnnranderson commented 6 years ago

When loading the Pull Requests page (where it lists out all the PRs that are open), it no longer succeeds at styling the table.

I receive the following error in the console: not able to load plugin PR filter table Error: No bitbucket/internal/feature/pull-request/table/pull-request-table

This error is produced from a try/catch found on line 2117 in the stash_page.js.

Not really sure what's missing, but I wonder if it's my BitBucket enterprise version being either too up to date, or too old? Seems like a bitbucket source file it uses to parse out the table isn't available or being served by my BitBucket server anymore.

ra100 commented 6 years ago

What's the version of your Bitbucket?

cnnranderson commented 6 years ago

v4.14.4

I think this version is actually kind of old, given it's an enterprise setup. Though, the plugin worked all up until about 2-3 weeks ago before the plugin version error issue came about (Issue #54)

ra100 commented 6 years ago

That actually is very likely, that's the issue. As with latest update of extension, new bitbucket api is used (in PR list)

cnnranderson commented 6 years ago

Ah... yeah, I see it now in the latest commits.

Are there plans to keep the back support? I wonder if it's broken simply because /table was added in the require() call?

edit: I could also throw up a PR, too :)

ra100 commented 6 years ago

That might be it can you try to checkout repo, remove table/ and load extension from folder? Then there could be try-catch block around that require, if it fails with "table" then try without

cnnranderson commented 6 years ago

Yep, that was going to be my first check. Turns out it fixes it!

I could try to make a PR in a bit with a conditional require check to see if one or the other loads?

ra100 commented 6 years ago

I won't be able to check it sooner that in 12hrs. So if you create PR by then, I can check.

cnnranderson commented 6 years ago

56 PR is up :) I'm a little weak with JS, but I can confirm this resolves the issue. It'd be nice if there's a way to check bitbucket version < 5.0 or something, but not immediately familiar with all the stuff going on in that script. Feel free to make any suggestions to improve the solution.