Skip to content

Commit 2ce3651

Browse files
[Bitbucket] commits view (#103)
1 parent 1a007f1 commit 2ce3651

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

src/button/button-contributions.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ export const buttonContributions: ButtonContributionParams[] = [
318318
]
319319

320320
},
321-
// BitBucket Server
321+
// Bitbucket Server
322322
{
323323
id: "bbs-repo",
324-
match: /\/browse/,
324+
match: /\/(browse|commits)/,
325325
exampleUrls: [
326326
"https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse",
327327
"https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse?at=refs%2Fheads%2Fmy-branch",
@@ -333,12 +333,11 @@ export const buttonContributions: ButtonContributionParams[] = [
333333
}),
334334
application: "bitbucket-server",
335335
additionalClassNames: ["secondary"],
336-
337336
},
338337
{
339338
id: "bbs-pull-request",
340339
exampleUrls: [
341-
// disabled becaus it doesn't work anonymously
340+
// disabled because it doesn't work anonymously
342341
// "https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/pull-requests/1/overview",
343342
],
344343
selector: "#pull-requests-container > header > div.pull-request-header-bar > div.pull-request-actions",
@@ -348,10 +347,10 @@ export const buttonContributions: ButtonContributionParams[] = [
348347
}),
349348
application: "bitbucket-server",
350349
},
351-
350+
352351
// bitbucket.org
353-
// we use xpath epressions, because the CSS selectors are not stable enough
354-
// tests are disabled because the URLs are not rechable without a session
352+
// we use xpath expressions, because the CSS selectors are not stable enough
353+
// tests are disabled because the URLs are not reachable without a session
355354
{
356355
id: "bb-repo",
357356
exampleUrls: [
@@ -386,5 +385,17 @@ export const buttonContributions: ButtonContributionParams[] = [
386385
marginLeft: "2px",
387386
}),
388387
application: "bitbucket",
388+
},
389+
{
390+
id: "bb-commits",
391+
match: /\/commits\/(.+)?/,
392+
exampleUrls: [
393+
"https://bitbucket.org/efftinge/browser-extension-test/commits/"
394+
],
395+
selector: 'xpath://*[@id="root"]/div[2]/div[3]/div/div/div[1]/div/div/div[1]/div[1]/div[2]/div',
396+
containerElement: createElement("div", {
397+
marginLeft: "2px",
398+
}),
399+
application: "bitbucket",
389400
}
390401
];

test/src/button-contributions-copy.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ export const buttonContributions: ButtonContributionParams[] = [
318318
]
319319

320320
},
321-
// BitBucket Server
321+
// Bitbucket Server
322322
{
323323
id: "bbs-repo",
324-
match: /\/browse/,
324+
match: /\/(browse|commits)/,
325325
exampleUrls: [
326326
"https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse",
327327
"https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/browse?at=refs%2Fheads%2Fmy-branch",
@@ -333,12 +333,11 @@ export const buttonContributions: ButtonContributionParams[] = [
333333
}),
334334
application: "bitbucket-server",
335335
additionalClassNames: ["secondary"],
336-
337336
},
338337
{
339338
id: "bbs-pull-request",
340339
exampleUrls: [
341-
// disabled becaus it doesn't work anonymously
340+
// disabled because it doesn't work anonymously
342341
// "https://bitbucket.gitpod-dev.com/users/svenefftinge/repos/browser-extension-test/pull-requests/1/overview",
343342
],
344343
selector: "#pull-requests-container > header > div.pull-request-header-bar > div.pull-request-actions",
@@ -348,10 +347,10 @@ export const buttonContributions: ButtonContributionParams[] = [
348347
}),
349348
application: "bitbucket-server",
350349
},
351-
350+
352351
// bitbucket.org
353-
// we use xpath epressions, because the CSS selectors are not stable enough
354-
// tests are disabled because the URLs are not rechable without a session
352+
// we use xpath expressions, because the CSS selectors are not stable enough
353+
// tests are disabled because the URLs are not reachable without a session
355354
{
356355
id: "bb-repo",
357356
exampleUrls: [
@@ -386,5 +385,17 @@ export const buttonContributions: ButtonContributionParams[] = [
386385
marginLeft: "2px",
387386
}),
388387
application: "bitbucket",
388+
},
389+
{
390+
id: "bb-commits",
391+
match: /\/commits\/(.+)?/,
392+
exampleUrls: [
393+
"https://bitbucket.org/efftinge/browser-extension-test/commits/"
394+
],
395+
selector: 'xpath://*[@id="root"]/div[2]/div[3]/div/div/div[1]/div/div/div[1]/div[1]/div[2]/div',
396+
containerElement: createElement("div", {
397+
marginLeft: "2px",
398+
}),
399+
application: "bitbucket",
389400
}
390401
];

0 commit comments

Comments
 (0)