Skip to content

Commit

Permalink
[bb] fix PR selector when not authed
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Oct 18, 2024
1 parent 541a32a commit ab553fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/button/button-contributions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,9 @@ export const buttonContributions: ButtonContributionParams[] = [
exampleUrls: [
// "https://bitbucket.org/efftinge/browser-extension-test/pull-requests/1"
],
selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div[1]/div', // section with the "Request changes" and "Approve" buttons
selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div', // grandparent div of the "Request changes" and "Approve" buttons
containerElement: createElement("div", {}),
insertBefore: 'xpath:(//*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div)[last()]', // note the [last()] to insert before the last child (the kebab menu)
application: "bitbucket",
},
{
Expand Down
3 changes: 2 additions & 1 deletion test/src/button-contributions-copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,9 @@ export const buttonContributions: ButtonContributionParams[] = [
exampleUrls: [
// "https://bitbucket.org/efftinge/browser-extension-test/pull-requests/1"
],
selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div[1]/div', // section with the "Request changes" and "Approve" buttons
selector: 'xpath://*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div', // grandparent div of the "Request changes" and "Approve" buttons
containerElement: createElement("div", {}),
insertBefore: 'xpath:(//*[@id="main"]/div/div/div[1]/div/div/div[1]/div/div[2]/div/div[2]/div/div/div)[last()]', // note the [last()] to insert before the last child (the kebab menu)
application: "bitbucket",
},
{
Expand Down

0 comments on commit ab553fb

Please sign in to comment.