@ffflorian/auto-merge 1.4.5 → 1.4.6
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/dist/AutoMerge.js +3 -2
- package/package.json +5 -5
package/dist/AutoMerge.js
CHANGED
|
@@ -69,7 +69,8 @@ export class AutoMerge {
|
|
|
69
69
|
if (!response.ok) {
|
|
70
70
|
throw new Error(`Error while checking merge request: ${response.statusText}`);
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
const pullRequestData = await response.json();
|
|
73
|
+
return pullRequestData.mergeable_state === 'clean';
|
|
73
74
|
}
|
|
74
75
|
async mergeByMatch(regex, repositories) {
|
|
75
76
|
const allRepositories = repositories || (await this.getRepositoriesWithOpenPullRequests());
|
|
@@ -78,7 +79,7 @@ export class AutoMerge {
|
|
|
78
79
|
for (const { pullRequests, repositorySlug } of matchingRepositories) {
|
|
79
80
|
const actionResults = [];
|
|
80
81
|
for (const pullRequest of pullRequests) {
|
|
81
|
-
const isMergeable = this.isPullRequestMergeable(repositorySlug, pullRequest.number);
|
|
82
|
+
const isMergeable = await this.isPullRequestMergeable(repositorySlug, pullRequest.number);
|
|
82
83
|
if (!isMergeable) {
|
|
83
84
|
this.logger.warn(`Pull request #${pullRequest.number} in "${repositorySlug}" is not mergeable. Skipping.`);
|
|
84
85
|
continue;
|
package/package.json
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"http-status-codes": "2.3.0",
|
|
12
12
|
"nock": "14.0.10",
|
|
13
|
-
"rimraf": "6.1.
|
|
14
|
-
"tsx": "4.
|
|
13
|
+
"rimraf": "6.1.2",
|
|
14
|
+
"tsx": "4.21.0",
|
|
15
15
|
"typescript": "5.9.3",
|
|
16
|
-
"vitest": "4.0.
|
|
16
|
+
"vitest": "4.0.15"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 18.0"
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
"test": "vitest run"
|
|
39
39
|
},
|
|
40
40
|
"type": "module",
|
|
41
|
-
"version": "1.4.
|
|
42
|
-
"gitHead": "
|
|
41
|
+
"version": "1.4.6",
|
|
42
|
+
"gitHead": "a6dc75c712d4c99a7eedffb1b0f1516d5da42535"
|
|
43
43
|
}
|