github-repository-provider 7.25.60 → 7.25.63

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
@@ -308,13 +308,14 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
308
308
 
309
309
  ### refId
310
310
 
311
+ Get sha of a ref.
311
312
  <https://developer.github.com/v3/git/refs/>
312
313
 
313
314
  #### Parameters
314
315
 
315
316
  * `ref` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
316
317
 
317
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** sha of the ref
318
+ 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
318
319
 
319
320
  ### deletePullRequest
320
321
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-repository-provider",
3
- "version": "7.25.60",
3
+ "version": "7.25.63",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "content-entry": "^4.1.9",
34
34
  "fetch-link-util": "^1.0.7",
35
- "fetch-rate-limit-util": "^2.4.11",
35
+ "fetch-rate-limit-util": "^2.5.1",
36
36
  "matching-iterator": "^2.0.3",
37
37
  "node-fetch": "^3.2.3",
38
38
  "one-time-execution-method": "^2.0.13",
@@ -158,12 +158,7 @@ export class GithubRepository extends Repository {
158
158
  console.log(res);
159
159
  */
160
160
  } else {
161
- const { json } = await this.provider.fetchJSON(
162
- `repos/${this.slug}/git/ref/heads/${
163
- from === undefined ? this.defaultBranchName : from.name
164
- }`
165
- );
166
- sha = json.object.sha;
161
+ sha = await this.refId(`heads/${from ? from.name : this.defaultBranchName}` );
167
162
  }
168
163
 
169
164
  const res = await this.provider.fetch(`repos/${this.slug}/git/refs`, {