bitbucket-repository-provider 5.0.6 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bitbucket-repository-provider",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"fetch-rate-limit-util": "^4.0.2",
|
|
34
34
|
"matching-iterator": "^2.0.11",
|
|
35
35
|
"one-time-execution-method": "^3.0.6",
|
|
36
|
-
"repository-provider": "^32.7.
|
|
36
|
+
"repository-provider": "^32.7.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"ava": "^5.2.0",
|
|
40
40
|
"c8": "^7.13.0",
|
|
41
41
|
"documentation": "^14.0.1",
|
|
42
|
-
"repository-provider-test-support": "^2.3.
|
|
42
|
+
"repository-provider-test-support": "^2.3.2",
|
|
43
43
|
"semantic-release": "^21.0.1"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": ">=18.
|
|
46
|
+
"node": ">=18.16.0"
|
|
47
47
|
},
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
@@ -9,12 +9,16 @@ import {
|
|
|
9
9
|
* Pull request inside bitbucket
|
|
10
10
|
*/
|
|
11
11
|
export class BitbucketPullRequest extends PullRequest {
|
|
12
|
+
|
|
13
|
+
static states = new Set(["OPEN", "MERGED", "SUPERSEDED", "DECLINED"]);
|
|
14
|
+
static mergeStrategies = new Set(["fast_forward", "squash", "merge_commit"]);
|
|
15
|
+
|
|
12
16
|
static get attributes() {
|
|
13
17
|
return {
|
|
14
18
|
...super.attributes,
|
|
15
19
|
state: {
|
|
16
20
|
...default_attribute,
|
|
17
|
-
values:
|
|
21
|
+
values: this.states,
|
|
18
22
|
writeable: true
|
|
19
23
|
},
|
|
20
24
|
close_source_branch: boolean_attribute,
|
|
@@ -122,7 +126,7 @@ export class BitbucketPullRequest extends PullRequest {
|
|
|
122
126
|
/**
|
|
123
127
|
* {@link https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/merge}
|
|
124
128
|
*/
|
|
125
|
-
async _merge(
|
|
129
|
+
async _merge(merge_strategy = "merge_commit") {
|
|
126
130
|
const url = `${this.destination.api}/pullrequests/${this.number}/merge`;
|
|
127
131
|
return this.destination.provider.fetch(url, {
|
|
128
132
|
type: "a type",
|
|
@@ -130,7 +134,7 @@ export class BitbucketPullRequest extends PullRequest {
|
|
|
130
134
|
method: "POST",
|
|
131
135
|
data: {
|
|
132
136
|
close_source_branch: false,
|
|
133
|
-
merge_strategy
|
|
137
|
+
merge_strategy
|
|
134
138
|
}
|
|
135
139
|
});
|
|
136
140
|
}
|