github-repository-provider 7.30.21 → 7.30.24
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/README.md +34 -20
- package/package.json +3 -3
- package/src/github-branch.mjs +2 -2
package/README.md
CHANGED
|
@@ -38,17 +38,15 @@ console.log(entry.name);
|
|
|
38
38
|
* [Parameters](#parameters)
|
|
39
39
|
* [commit](#commit)
|
|
40
40
|
* [Parameters](#parameters-1)
|
|
41
|
-
* [commitForSha](#commitforsha)
|
|
42
|
-
* [Parameters](#parameters-2)
|
|
43
41
|
* [entry](#entry)
|
|
44
|
-
* [Parameters](#parameters-
|
|
42
|
+
* [Parameters](#parameters-2)
|
|
45
43
|
* [removeEntries](#removeentries)
|
|
46
|
-
* [Parameters](#parameters-
|
|
44
|
+
* [Parameters](#parameters-3)
|
|
47
45
|
* [GithubOwner](#githubowner)
|
|
48
46
|
* [createRepository](#createrepository)
|
|
49
|
-
* [Parameters](#parameters-
|
|
47
|
+
* [Parameters](#parameters-4)
|
|
50
48
|
* [deleteRepository](#deleterepository)
|
|
51
|
-
* [Parameters](#parameters-
|
|
49
|
+
* [Parameters](#parameters-5)
|
|
52
50
|
* [attributeMapping](#attributemapping)
|
|
53
51
|
* [GithubProvider](#githubprovider)
|
|
54
52
|
* [Examples](#examples)
|
|
@@ -58,16 +56,18 @@ console.log(entry.name);
|
|
|
58
56
|
* [instanceIdentifier](#instanceidentifier)
|
|
59
57
|
* [GithubPullRequest](#githubpullrequest)
|
|
60
58
|
* [\_merge](#\_merge)
|
|
61
|
-
* [Parameters](#parameters-
|
|
59
|
+
* [Parameters](#parameters-6)
|
|
62
60
|
* [update](#update)
|
|
63
61
|
* [validMergeMethods](#validmergemethods)
|
|
64
62
|
* [list](#list)
|
|
65
|
-
* [Parameters](#parameters-
|
|
63
|
+
* [Parameters](#parameters-7)
|
|
66
64
|
* [open](#open)
|
|
67
|
-
* [Parameters](#parameters-
|
|
65
|
+
* [Parameters](#parameters-8)
|
|
68
66
|
* [GithubRepository](#githubrepository)
|
|
69
67
|
* [defaultBranchName](#defaultbranchname)
|
|
70
68
|
* [commits](#commits)
|
|
69
|
+
* [Parameters](#parameters-9)
|
|
70
|
+
* [commitForSha](#commitforsha)
|
|
71
71
|
* [Parameters](#parameters-10)
|
|
72
72
|
* [tree](#tree)
|
|
73
73
|
* [Parameters](#parameters-11)
|
|
@@ -82,8 +82,10 @@ console.log(entry.name);
|
|
|
82
82
|
* [update](#update-1)
|
|
83
83
|
* [refId](#refid)
|
|
84
84
|
* [Parameters](#parameters-13)
|
|
85
|
-
* [
|
|
85
|
+
* [setRefId](#setrefid)
|
|
86
86
|
* [Parameters](#parameters-14)
|
|
87
|
+
* [deletePullRequest](#deletepullrequest)
|
|
88
|
+
* [Parameters](#parameters-15)
|
|
87
89
|
* [initializeHooks](#initializehooks)
|
|
88
90
|
|
|
89
91
|
## GithubBranch
|
|
@@ -115,16 +117,6 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
115
117
|
* `entries` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<ContentEntry>**
|
|
116
118
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
117
119
|
|
|
118
|
-
### commitForSha
|
|
119
|
-
|
|
120
|
-
<https://developer.github.com/v3/git/commits/#get-a-commit>
|
|
121
|
-
|
|
122
|
-
#### Parameters
|
|
123
|
-
|
|
124
|
-
* `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
125
|
-
|
|
126
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** response
|
|
127
|
-
|
|
128
120
|
### entry
|
|
129
121
|
|
|
130
122
|
<https://developer.github.com/v3/repos/contents/#get-repository-content>
|
|
@@ -288,6 +280,16 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
288
280
|
|
|
289
281
|
Returns **AsyncIterator\<Commit>**
|
|
290
282
|
|
|
283
|
+
### commitForSha
|
|
284
|
+
|
|
285
|
+
<https://developer.github.com/v3/git/commits/#get-a-commit>
|
|
286
|
+
|
|
287
|
+
#### Parameters
|
|
288
|
+
|
|
289
|
+
* `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
290
|
+
|
|
291
|
+
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** response
|
|
292
|
+
|
|
291
293
|
### tree
|
|
292
294
|
|
|
293
295
|
* **See**: <https://developer.github.com/v3/git/trees/>
|
|
@@ -354,6 +356,18 @@ Get sha of a ref.
|
|
|
354
356
|
|
|
355
357
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** sha of the ref
|
|
356
358
|
|
|
359
|
+
### setRefId
|
|
360
|
+
|
|
361
|
+
<https://docs.github.com/en/github-ae@latest/rest/git/refs#update-a-reference>
|
|
362
|
+
|
|
363
|
+
#### Parameters
|
|
364
|
+
|
|
365
|
+
* `ref` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
366
|
+
* `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
367
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
368
|
+
|
|
369
|
+
Returns **any**
|
|
370
|
+
|
|
357
371
|
### deletePullRequest
|
|
358
372
|
|
|
359
373
|
<https://developer.github.com/v3/pulls/#update-a-pull-request>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.30.
|
|
3
|
+
"version": "7.30.24",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"matching-iterator": "^2.0.6",
|
|
37
37
|
"node-fetch": "^3.2.6",
|
|
38
38
|
"one-time-execution-method": "^3.0.3",
|
|
39
|
-
"repository-provider": "^
|
|
39
|
+
"repository-provider": "^32.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"ava": "^4.3.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"etag-cache-leveldb": "^1.2.4",
|
|
46
46
|
"leveldown": "^6.1.1",
|
|
47
47
|
"levelup": "^5.1.1",
|
|
48
|
-
"repository-provider-test-support": "^2.2.
|
|
48
|
+
"repository-provider-test-support": "^2.2.8",
|
|
49
49
|
"semantic-release": "^19.0.3"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
package/src/github-branch.mjs
CHANGED
|
@@ -55,7 +55,7 @@ export class GithubBranch extends Branch {
|
|
|
55
55
|
entries.map(entry => this.writeEntry(entry))
|
|
56
56
|
);
|
|
57
57
|
|
|
58
|
-
const shaLatestCommit = await this.refId
|
|
58
|
+
const shaLatestCommit = await this.refId;
|
|
59
59
|
const latestCommit = await this.owner.commitForSha(shaLatestCommit);
|
|
60
60
|
const tree = await this.owner.addTree(updates, latestCommit.tree.sha);
|
|
61
61
|
const commit = await this.owner.addCommit(
|
|
@@ -99,7 +99,7 @@ export class GithubBranch extends Branch {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
async *entries(patterns) {
|
|
102
|
-
const commit = await this.owner.commitForSha(await this.refId
|
|
102
|
+
const commit = await this.owner.commitForSha(await this.refId);
|
|
103
103
|
|
|
104
104
|
for (const entry of matcher(
|
|
105
105
|
await this.owner.tree(commit.tree.sha),
|