File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed
Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -210,16 +210,15 @@ function main() {
210210 const newBaseSha = eventData.before;
211211 const newHeadSha = eventData.after;
212212 const response = yield octokit.repos.compareCommits({
213+ headers: {
214+ accept: "application/vnd.github.v3.diff",
215+ },
213216 owner: prDetails.owner,
214217 repo: prDetails.repo,
215218 base: newBaseSha,
216219 head: newHeadSha,
217220 });
218- diff = response.data.diff_url
219- ? yield octokit
220- .request({ url: response.data.diff_url })
221- .then((res) => res.data)
222- : null;
221+ diff = String(response.data);
223222 }
224223 else {
225224 console.log("Unsupported event:", process.env.GITHUB_EVENT_NAME);
Original file line number Diff line number Diff line change @@ -213,17 +213,16 @@ async function main() {
213213 const newHeadSha = eventData . after ;
214214
215215 const response = await octokit . repos . compareCommits ( {
216+ headers : {
217+ accept : "application/vnd.github.v3.diff" ,
218+ } ,
216219 owner : prDetails . owner ,
217220 repo : prDetails . repo ,
218221 base : newBaseSha ,
219222 head : newHeadSha ,
220223 } ) ;
221224
222- diff = response . data . diff_url
223- ? await octokit
224- . request ( { url : response . data . diff_url } )
225- . then ( ( res ) => res . data )
226- : null ;
225+ diff = String ( response . data ) ;
227226 } else {
228227 console . log ( "Unsupported event:" , process . env . GITHUB_EVENT_NAME ) ;
229228 return ;
You can’t perform that action at this time.
0 commit comments