From 9f4951fcf23cc5d9cad6274383c30fc0894bb578 Mon Sep 17 00:00:00 2001 From: Benaiah Mischenko Date: Thu, 14 Sep 2017 17:32:18 -0700 Subject: [PATCH] Fix entry deletion on non-master branches --- src/backends/github/API.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backends/github/API.js b/src/backends/github/API.js index 934e0c44..b162a401 100644 --- a/src/backends/github/API.js +++ b/src/backends/github/API.js @@ -275,8 +275,10 @@ export default class API { const branch = options.branch || this.branch; const fileURL = `${ this.repoURL }/contents/${ path }`; // We need to request the file first to get the SHA - return this.request(fileURL) - .then(({ sha }) => this.request(fileURL, { + return this.request(fileURL, { + params: { ref: branch }, + cache: "no-store", + }).then(({ sha }) => this.request(fileURL, { method: "DELETE", params: { sha,