Skip to content

Commit

Permalink
Try to disable HTTP caching (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalgn committed Mar 24, 2022
1 parent bfc88d5 commit 0e2da31
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ async function executeLocally(context, url) {
const { data: pull_request } = await octokit.pulls.get({
owner: m[1],
repo: m[2],
pull_number: m[4]
pull_number: m[4],
headers: { "If-None-Match": "" }
});

const event = {
Expand Down Expand Up @@ -147,7 +148,8 @@ async function handleArbitraryPullRequestUpdate(context, eventData) {
const { data: pullRequest } = await octokit.pulls.get({
owner: repoOwner,
repo: repoName,
pull_number: pullRequestNumber
pull_number: pullRequestNumber,
headers: { "If-None-Match": "" }
});
logger.trace("Full PR:", pullRequest);

Expand Down Expand Up @@ -438,7 +440,8 @@ async function fetchPullRequest(context, repository, issue) {
let { data: pullRequest } = await octokit.pulls.get({
owner: repository.owner.login,
repo: repository.name,
pull_number: number
pull_number: number,
headers: { "If-None-Match": "" }
});

logger.trace("Full PR:", pullRequest);
Expand Down Expand Up @@ -1272,7 +1275,8 @@ async function getPullRequest(octokit, pullRequest) {
const { data: pr } = await octokit.pulls.get({
owner: pullRequest.base.repo.owner.login,
repo: pullRequest.base.repo.name,
pull_number: pullRequest.number
pull_number: pullRequest.number,
headers: { "If-None-Match": "" }
});

logger.trace("PR:", pr);
Expand Down Expand Up @@ -1551,7 +1555,8 @@ async function pullRequestState(
const { data } = await octokit.pulls.get({
owner: pullRequest.base.repo.owner.login,
repo: pullRequest.base.repo.name,
pull_number: pullRequest.number
pull_number: pullRequest.number,
headers: { "If-None-Match": "" }
});
fullPullRequest = data;
}
Expand Down
9 changes: 6 additions & 3 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ async function executeLocally(context, url) {
const { data: pull_request } = await octokit.pulls.get({
owner: m[1],
repo: m[2],
pull_number: m[4]
pull_number: m[4],
headers: { "If-None-Match": "" }
});

const event = {
Expand Down Expand Up @@ -140,7 +141,8 @@ async function handleArbitraryPullRequestUpdate(context, eventData) {
const { data: pullRequest } = await octokit.pulls.get({
owner: repoOwner,
repo: repoName,
pull_number: pullRequestNumber
pull_number: pullRequestNumber,
headers: { "If-None-Match": "" }
});
logger.trace("Full PR:", pullRequest);

Expand Down Expand Up @@ -431,7 +433,8 @@ async function fetchPullRequest(context, repository, issue) {
let { data: pullRequest } = await octokit.pulls.get({
owner: repository.owner.login,
repo: repository.name,
pull_number: number
pull_number: number,
headers: { "If-None-Match": "" }
});

logger.trace("Full PR:", pullRequest);
Expand Down
3 changes: 2 additions & 1 deletion lib/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ async function getPullRequest(octokit, pullRequest) {
const { data: pr } = await octokit.pulls.get({
owner: pullRequest.base.repo.owner.login,
repo: pullRequest.base.repo.name,
pull_number: pullRequest.number
pull_number: pullRequest.number,
headers: { "If-None-Match": "" }
});

logger.trace("PR:", pr);
Expand Down
3 changes: 2 additions & 1 deletion lib/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ async function pullRequestState(
const { data } = await octokit.pulls.get({
owner: pullRequest.base.repo.owner.login,
repo: pullRequest.base.repo.name,
pull_number: pullRequest.number
pull_number: pullRequest.number,
headers: { "If-None-Match": "" }
});
fullPullRequest = data;
}
Expand Down

0 comments on commit 0e2da31

Please sign in to comment.