Skip to content
This repository has been archived by the owner on Jun 5, 2021. It is now read-only.

Commit

Permalink
fix: Fixed updating year
Browse files Browse the repository at this point in the history
  • Loading branch information
floric committed Aug 1, 2020
1 parent 7f2d647 commit 952e68c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/io/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ async function getContent(context, path) {
existingSha: res === null || res === void 0 ? void 0 : res.data.sha,
};
}
else {
core.warning(`Unexpected response code ${res === null || res === void 0 ? void 0 : res.status}`);
}
}
catch (err) {
return { existingSha: null, serializedData: null };
core.error(`Reading from ${path} on ${context.branch} failed: ${err.message}`);
}
return { existingSha: null, serializedData: null };
}
exports.getContent = getContent;
async function createOrUpdateContent(context, path, content, existingSha) {
Expand Down
7 changes: 6 additions & 1 deletion src/io/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ export async function getContent(
serializedData: fromBase64(res.data.content),
existingSha: res?.data.sha,
};
} else {
core.warning(`Unexpected response code ${res?.status}`);
}
} catch (err) {
return { existingSha: null, serializedData: null };
core.error(
`Reading from ${path} on ${context.branch} failed: ${err.message}`
);
}
return { existingSha: null, serializedData: null };
}

export async function createOrUpdateContent(
Expand Down

0 comments on commit 952e68c

Please sign in to comment.