github-repository-provider 9.2.21 → 9.2.23
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": "github-repository-provider",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.23",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"fetch-rate-limit-util": "^4.5.3",
|
|
41
41
|
"matching-iterator": "^2.1.4",
|
|
42
42
|
"one-time-execution-method": "^3.1.3",
|
|
43
|
-
"repository-provider": "^35.
|
|
43
|
+
"repository-provider": "^35.5.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/node": "^24.0.
|
|
46
|
+
"@types/node": "^24.0.15",
|
|
47
47
|
"ava": "^6.4.1",
|
|
48
48
|
"c8": "^10.1.3",
|
|
49
49
|
"documentation": "^14.0.3",
|
|
50
|
-
"etag-cache-leveldb": "^2.1.
|
|
50
|
+
"etag-cache-leveldb": "^2.1.15",
|
|
51
51
|
"leveldown": "^6.1.1",
|
|
52
52
|
"levelup": "^5.1.1",
|
|
53
|
-
"repository-provider-test-support": "^3.1.
|
|
53
|
+
"repository-provider-test-support": "^3.1.48",
|
|
54
54
|
"semantic-release": "^24.2.7",
|
|
55
55
|
"typescript": "^5.8.3"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
|
-
"node": ">=22.
|
|
58
|
+
"node": ">=22.17.1"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
package/src/github-provider.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { replaceWithOneTimeExecutionMethod } from "one-time-execution-method";
|
|
2
2
|
import { stateActionHandler } from "fetch-rate-limit-util";
|
|
3
|
-
import {
|
|
3
|
+
import { url_attribute, default_attribute, priority_attribute } from "pacc";
|
|
4
|
+
import { MultiGroupProvider } from "repository-provider";
|
|
4
5
|
import { GithubRepository } from "./github-repository.mjs";
|
|
5
6
|
import { GithubBranch } from "./github-branch.mjs";
|
|
6
7
|
import { GithubOwner } from "./github-owner.mjs";
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
Repository,
|
|
4
|
-
Branch,
|
|
5
|
-
boolean_attribute
|
|
6
|
-
} from "repository-provider";
|
|
1
|
+
import { boolean_attribute } from "pacc";
|
|
2
|
+
import { PullRequest, Repository, Branch } from "repository-provider";
|
|
7
3
|
import { getHeaderLink } from "fetch-link-util";
|
|
8
4
|
|
|
9
5
|
/**
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { replaceWithOneTimeExecutionMethod } from "one-time-execution-method";
|
|
2
2
|
import {
|
|
3
|
-
Repository,
|
|
4
3
|
boolean_attribute,
|
|
5
4
|
url_attribute,
|
|
6
5
|
size_attribute,
|
|
7
6
|
language_attribute,
|
|
8
|
-
default_attribute
|
|
7
|
+
default_attribute
|
|
8
|
+
} from "pacc";
|
|
9
|
+
import {
|
|
10
|
+
Repository,
|
|
9
11
|
mapAttributesInverse,
|
|
10
12
|
optionJSON,
|
|
11
13
|
Commit
|
|
@@ -56,7 +58,7 @@ export class GithubRepository extends Repository {
|
|
|
56
58
|
squash_merge_commit_title: default_attribute,
|
|
57
59
|
squash_merge_commit_message: default_attribute,
|
|
58
60
|
merge_commit_title: default_attribute,
|
|
59
|
-
merge_commit_message: default_attribute
|
|
61
|
+
merge_commit_message: default_attribute
|
|
60
62
|
//custom_properties: default_attribute
|
|
61
63
|
};
|
|
62
64
|
}
|
|
@@ -266,9 +268,9 @@ export class GithubRepository extends Repository {
|
|
|
266
268
|
// TODO why does this happen ?
|
|
267
269
|
if (!response.ok || !json.object.sha) {
|
|
268
270
|
let message = `No refId for '${this.fullName}' '${ref}'`;
|
|
269
|
-
|
|
270
|
-
if(!response.ok) {
|
|
271
|
-
|
|
271
|
+
|
|
272
|
+
if (!response.ok) {
|
|
273
|
+
message += "," + response.statusText + " (" + response.status + ")";
|
|
272
274
|
}
|
|
273
275
|
|
|
274
276
|
throw new Error(message);
|
|
@@ -301,13 +303,16 @@ export class GithubRepository extends Repository {
|
|
|
301
303
|
async setRefId(ref, sha, options) {
|
|
302
304
|
ref = ref.replace(/^refs\//, "");
|
|
303
305
|
|
|
304
|
-
const result = await this.provider.fetchJSON(
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
306
|
+
const result = await this.provider.fetchJSON(
|
|
307
|
+
`${this.api}/git/refs/${ref}`,
|
|
308
|
+
{
|
|
309
|
+
method: "PATCH",
|
|
310
|
+
body: JSON.stringify({
|
|
311
|
+
...options,
|
|
312
|
+
sha
|
|
313
|
+
})
|
|
314
|
+
}
|
|
315
|
+
);
|
|
311
316
|
|
|
312
317
|
if (result.response.ok) {
|
|
313
318
|
this.#refs.set(ref, sha);
|
|
@@ -21,7 +21,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
21
21
|
host: {
|
|
22
22
|
env: string[];
|
|
23
23
|
default: string;
|
|
24
|
-
name: string;
|
|
25
24
|
type: string;
|
|
26
25
|
isKey: boolean;
|
|
27
26
|
writable: boolean;
|
|
@@ -35,7 +34,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
35
34
|
};
|
|
36
35
|
ssh: {
|
|
37
36
|
default: string;
|
|
38
|
-
name: string;
|
|
39
37
|
type: string;
|
|
40
38
|
isKey: boolean;
|
|
41
39
|
writable: boolean;
|
|
@@ -53,7 +51,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
53
51
|
set: (value: any) => any;
|
|
54
52
|
default: string;
|
|
55
53
|
depends: string;
|
|
56
|
-
name: string;
|
|
57
54
|
type: string;
|
|
58
55
|
isKey: boolean;
|
|
59
56
|
writable: boolean;
|
|
@@ -68,7 +65,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
68
65
|
set: (value: any) => any;
|
|
69
66
|
depends: string;
|
|
70
67
|
default: string;
|
|
71
|
-
name: string;
|
|
72
68
|
type: string;
|
|
73
69
|
isKey: boolean;
|
|
74
70
|
writable: boolean;
|
|
@@ -85,7 +81,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
85
81
|
};
|
|
86
82
|
private: boolean;
|
|
87
83
|
mandatory: boolean;
|
|
88
|
-
name: string;
|
|
89
84
|
type: string;
|
|
90
85
|
isKey: boolean;
|
|
91
86
|
writable: boolean;
|
|
@@ -97,7 +92,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
97
92
|
};
|
|
98
93
|
priority: {
|
|
99
94
|
default: number;
|
|
100
|
-
name: string;
|
|
101
95
|
type: string;
|
|
102
96
|
isKey: boolean;
|
|
103
97
|
writable: boolean;
|
|
@@ -112,7 +106,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
112
106
|
};
|
|
113
107
|
name: {
|
|
114
108
|
env: string;
|
|
115
|
-
name: string;
|
|
116
109
|
type: string;
|
|
117
110
|
isKey: boolean;
|
|
118
111
|
writable: boolean;
|
|
@@ -131,7 +124,6 @@ export class GithubProvider extends MultiGroupProvider {
|
|
|
131
124
|
default: Console;
|
|
132
125
|
writable: boolean;
|
|
133
126
|
private: boolean;
|
|
134
|
-
name: string;
|
|
135
127
|
isKey: boolean;
|
|
136
128
|
mandatory: boolean;
|
|
137
129
|
depends?: string;
|