github-repository-provider 7.24.3 → 7.24.4
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 +1 -1
- package/src/github-branch.mjs +2 -3
package/package.json
CHANGED
package/src/github-branch.mjs
CHANGED
|
@@ -15,17 +15,16 @@ export class GithubBranch extends Branch {
|
|
|
15
15
|
* Writes content into the branch
|
|
16
16
|
* {@link https://developer.github.com/v3/git/blobs/#get-a-blob}
|
|
17
17
|
* @param {ConentEntry} entry
|
|
18
|
-
* @return {Promise<
|
|
18
|
+
* @return {Promise<ConentEntry>} written content with sha values set
|
|
19
19
|
*/
|
|
20
20
|
async writeEntry(entry) {
|
|
21
|
-
const
|
|
21
|
+
const json = await this.provider.fetchJSON(`repos/${this.slug}/git/blobs`, {
|
|
22
22
|
method: "POST",
|
|
23
23
|
body: JSON.stringify({
|
|
24
24
|
content: await entry.string,
|
|
25
25
|
encoding: "utf8"
|
|
26
26
|
})
|
|
27
27
|
});
|
|
28
|
-
const json = await res.json();
|
|
29
28
|
|
|
30
29
|
entry.sha = json.sha;
|
|
31
30
|
|