github-repository-provider 8.0.16 → 8.0.17
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 +7 -7
- package/package.json +3 -3
- package/src/github-branch.mjs +3 -3
- package/src/github-pull-request.mjs +1 -1
- package/src/github-repository.mjs +3 -3
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ Writes content into the branch
|
|
|
110
110
|
|
|
111
111
|
#### Parameters
|
|
112
112
|
|
|
113
|
-
* `entry` **
|
|
113
|
+
* `entry` **ContentEntry** 
|
|
114
114
|
|
|
115
115
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ContentEntry>** written content with sha values set
|
|
116
116
|
|
|
@@ -124,7 +124,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
124
124
|
|
|
125
125
|
* `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
126
126
|
* `entries` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\<ContentEntry>** 
|
|
127
|
-
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
127
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
128
128
|
|
|
129
129
|
### entry
|
|
130
130
|
|
|
@@ -140,7 +140,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
140
140
|
|
|
141
141
|
#### Parameters
|
|
142
142
|
|
|
143
|
-
* `entries` **
|
|
143
|
+
* `entries` **AsyncIterator\<ContentEntry>** 
|
|
144
144
|
|
|
145
145
|
## GithubOwner
|
|
146
146
|
|
|
@@ -267,7 +267,7 @@ Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
|
|
|
267
267
|
|
|
268
268
|
* `source` **Branch** 
|
|
269
269
|
* `destination` **Branch** 
|
|
270
|
-
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
270
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
271
271
|
|
|
272
272
|
## GithubRepository
|
|
273
273
|
|
|
@@ -297,7 +297,7 @@ Returns **AsyncIterator\<Commit>** 
|
|
|
297
297
|
|
|
298
298
|
* `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
299
299
|
|
|
300
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
300
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** response
|
|
301
301
|
|
|
302
302
|
### tree
|
|
303
303
|
|
|
@@ -307,7 +307,7 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
307
307
|
|
|
308
308
|
* `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
309
309
|
|
|
310
|
-
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
310
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>>** 
|
|
311
311
|
|
|
312
312
|
### addTree
|
|
313
313
|
|
|
@@ -318,7 +318,7 @@ Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Gl
|
|
|
318
318
|
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** 
|
|
319
319
|
* `base` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** base tree sha
|
|
320
320
|
|
|
321
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
321
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** newly created tree
|
|
322
322
|
|
|
323
323
|
### initializeBranches
|
|
324
324
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"ava": "^5.2.0",
|
|
41
41
|
"c8": "^7.13.0",
|
|
42
42
|
"documentation": "^14.0.1",
|
|
43
|
-
"etag-cache-leveldb": "^2.0.
|
|
43
|
+
"etag-cache-leveldb": "^2.0.3",
|
|
44
44
|
"leveldown": "^6.1.1",
|
|
45
45
|
"levelup": "^5.1.1",
|
|
46
|
-
"repository-provider-test-support": "^2.3.
|
|
46
|
+
"repository-provider-test-support": "^2.3.6",
|
|
47
47
|
"semantic-release": "^21.0.2"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|
package/src/github-branch.mjs
CHANGED
|
@@ -23,7 +23,7 @@ export class GithubBranch extends Branch {
|
|
|
23
23
|
/**
|
|
24
24
|
* Writes content into the branch
|
|
25
25
|
* {@link https://developer.github.com/v3/git/blobs/#get-a-blob}
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {ContentEntry} entry
|
|
27
27
|
* @return {Promise<ContentEntry>} written content with sha values set
|
|
28
28
|
*/
|
|
29
29
|
async writeEntry(entry) {
|
|
@@ -48,7 +48,7 @@ export class GithubBranch extends Branch {
|
|
|
48
48
|
* {@link https://developer.github.com/v3/git/refs/#update-a-reference}
|
|
49
49
|
* @param {string} message
|
|
50
50
|
* @param {ContentEntry[]} entries
|
|
51
|
-
* @param {Object} options
|
|
51
|
+
* @param {Object} [options]
|
|
52
52
|
*/
|
|
53
53
|
async commit(message, entries, options) {
|
|
54
54
|
/*
|
|
@@ -139,7 +139,7 @@ export class GithubBranch extends Branch {
|
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* https://developer.github.com/v3/repos/contents/
|
|
142
|
-
* @param {
|
|
142
|
+
* @param {AsyncIterator<ContentEntry>} entries
|
|
143
143
|
*/
|
|
144
144
|
async removeEntries(entries) {
|
|
145
145
|
for await (const entry of entries) {
|
|
@@ -68,7 +68,7 @@ export class GithubPullRequest extends PullRequest {
|
|
|
68
68
|
* {@link https://developer.github.com/v3/pulls/#create-a-pull-request}
|
|
69
69
|
* @param {Branch} source
|
|
70
70
|
* @param {Branch} destination
|
|
71
|
-
* @param {Object} options
|
|
71
|
+
* @param {Object} [options]
|
|
72
72
|
*/
|
|
73
73
|
static async open(source, destination, options) {
|
|
74
74
|
for await (const p of this.list(source.repository, {
|
|
@@ -103,7 +103,7 @@ export class GithubRepository extends Repository {
|
|
|
103
103
|
/**
|
|
104
104
|
* {@link https://developer.github.com/v3/git/commits/#get-a-commit}
|
|
105
105
|
* @param {string} sha
|
|
106
|
-
* @return {Object} response
|
|
106
|
+
* @return {Promise<Object>} response
|
|
107
107
|
*/
|
|
108
108
|
async commitForSha(sha) {
|
|
109
109
|
const commit = this.#commits.get(sha);
|
|
@@ -123,7 +123,7 @@ export class GithubRepository extends Repository {
|
|
|
123
123
|
/**
|
|
124
124
|
* @see https://developer.github.com/v3/git/trees/
|
|
125
125
|
* @param {string} sha
|
|
126
|
-
* @return {Object[]}
|
|
126
|
+
* @return {Promise<Object[]>}
|
|
127
127
|
*/
|
|
128
128
|
async tree(sha) {
|
|
129
129
|
let tree = this.#trees.get(sha);
|
|
@@ -146,7 +146,7 @@ export class GithubRepository extends Repository {
|
|
|
146
146
|
* @see https://developer.github.com/v3/git/trees/
|
|
147
147
|
* @param {Object[]} updates
|
|
148
148
|
* @param {string} base base tree sha
|
|
149
|
-
* @returns {Object} newly created tree
|
|
149
|
+
* @returns {Promise<Object>} newly created tree
|
|
150
150
|
*/
|
|
151
151
|
async addTree(updates, base) {
|
|
152
152
|
let { json } = await this.provider.fetchJSON(`${this.api}/git/trees`, {
|