-
Notifications
You must be signed in to change notification settings - Fork 6
/
bitbucket-server.json
83 lines (83 loc) · 3.61 KB
/
bitbucket-server.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
"$schema": "../handler-schema.json",
"name": "Bitbucket Server",
"private": "bitbucketServer",
"branchRef": "symbolic",
"url": [
"{% assign segments = repository | split: '/' | reverse %}",
"{{ base }}/projects/{{ segments[1] }}/repos/{{ segments[0] }}/browse/{{ file | encode_uri }}?at={{ ref | encode_uri_component }}"
],
"selection": "#{{ startLine }}{% if startLine != endLine %}-{{ endLine }}{% endif %}",
"reverse": {
"pattern": [
"/projects",
"/(?<project>[^/]+)",
"/repos",
"/(?<repository>[^/]+)",
"/browse",
"/(?<file>[^?#]+)",
"(?:\\?[^#]*)?",
"(?:#(?<start>\\d+)(?:-(?<end>\\d+))?)?"
],
"file": "{{ match.groups.file | decode_uri }}",
"server": {
"http": "{{ http }}/{{ match.groups.project }}/{{ match.groups.repository }}.git",
"ssh": "{{ ssh }}/{{ match.groups.project }}/{{ match.groups.repository }}.git"
},
"selection": {
"startLine": "{{ match.groups.start }}",
"endLine": "{{ match.groups.end }}"
}
},
"tests": {
"settings": {
"bitbucketServer": [
{
"http": "http://local-bitbucket:7990/context",
"ssh": "git@local-bitbucket:7999"
}
]
},
"createUrl": {
"remotes": {
"http": "http://local-bitbucket:7990/context/foo/bar.git",
"httpWithUsername": "http://username@local-bitbucket:7990/context/foo/bar.git",
"ssh": "git@local-bitbucket:7999/foo/bar.git",
"sshWithProtocol": "ssh://git@local-bitbucket:7999/foo/bar.git",
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/file.txt?at=refs%2Fheads%2Fmaster"
},
"spaces": {
"remote": "http://local-bitbucket:7990/context/foo/bar.git",
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/path%20spaces/file%20spaces.txt?at=refs%2Fheads%2Fmaster"
},
"branch": {
"remote": "http://local-bitbucket:7990/context/foo/bar.git",
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/file.txt?at=refs%2Fheads%2Ffeature%2Ftest"
},
"commit": {
"remote": "http://local-bitbucket:7990/context/foo/bar.git",
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/file.txt?at={{ commit }}"
},
"selection": {
"remote": "http://local-bitbucket:7990/context/foo/bar.git",
"point": {
"line": 10,
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/file.txt?at=refs%2Fheads%2Fmaster#10"
},
"singleLine": {
"line": 10,
"startColumn": 20,
"endColumn": 30,
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/file.txt?at=refs%2Fheads%2Fmaster#10"
},
"multipleLines": {
"startLine": 10,
"startColumn": 20,
"endLine": 30,
"endColumn": 40,
"result": "http://local-bitbucket:7990/context/projects/foo/repos/bar/browse/src/file.txt?at=refs%2Fheads%2Fmaster#10-30"
}
}
}
}
}