github-repository-provider 7.26.0 → 7.26.1

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 CHANGED
@@ -68,6 +68,8 @@ console.log(entry.name);
68
68
  * [open](#open)
69
69
  * [Parameters](#parameters-10)
70
70
  * [GithubRepository](#githubrepository)
71
+ * [commits](#commits)
72
+ * [Parameters](#parameters-11)
71
73
  * [initializeBranches](#initializebranches)
72
74
  * [initializeTags](#initializetags)
73
75
  * [urls](#urls)
@@ -75,9 +77,9 @@ console.log(entry.name);
75
77
  * [homePageURL](#homepageurl)
76
78
  * [update](#update)
77
79
  * [refId](#refid)
78
- * [Parameters](#parameters-11)
79
- * [deletePullRequest](#deletepullrequest)
80
80
  * [Parameters](#parameters-12)
81
+ * [deletePullRequest](#deletepullrequest)
82
+ * [Parameters](#parameters-13)
81
83
  * [initializeHooks](#initializehooks)
82
84
 
83
85
  ## GithubBranch
@@ -278,6 +280,16 @@ Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
278
280
 
279
281
  Repository on GitHub.
280
282
 
283
+ ### commits
284
+
285
+ <https://docs.github.com/en/rest/reference/commits#list-commits>
286
+
287
+ #### Parameters
288
+
289
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
290
+
291
+ Returns **AsyncIterator\<Commit>**
292
+
281
293
  ### initializeBranches
282
294
 
283
295
  <https://developer.github.com/v3/repos/branches/#list-branches>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-repository-provider",
3
- "version": "7.26.0",
3
+ "version": "7.26.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,7 +42,7 @@
42
42
  "ava": "^4.1.0",
43
43
  "c8": "^7.11.0",
44
44
  "documentation": "^13.2.5",
45
- "repository-provider-test-support": "^1.12.11",
45
+ "repository-provider-test-support": "^2.0.0",
46
46
  "semantic-release": "^19.0.2"
47
47
  },
48
48
  "engines": {
@@ -109,17 +109,25 @@ export class GithubBranch extends Branch {
109
109
  this._entries = new Map();
110
110
  }
111
111
 
112
- const { json } = await this.provider.fetchJSON(
113
- `repos/${this.slug}/contents/${name}?ref=${this.ref}`
114
- );
112
+ const f = async () => {
113
+ const { json } = await this.provider.fetchJSON(
114
+ `repos/${this.slug}/contents/${name}?ref=${this.ref}`
115
+ );
116
+
117
+ const entry = new this.entryClass(
118
+ name,
119
+ Buffer.from(json.content, "base64")
120
+ );
115
121
 
116
- const entry = new this.entryClass(
117
- name,
118
- Buffer.from(json.content, "base64")
119
- );
122
+ this._entries.set(name, entry);
123
+ return entry;
124
+ };
120
125
 
121
- this._entries.set(name, entry);
122
- return entry;
126
+ const p = f();
127
+
128
+ this._entries.set(name, p);
129
+
130
+ return p;
123
131
  }
124
132
 
125
133
  /**