mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
refactor(github): don’t try/catch getBranchCommit
This commit is contained in:
parent
fa7b3b5643
commit
728b44d74a
1 changed files with 4 additions and 8 deletions
|
@ -1331,14 +1331,10 @@ async function createBlob(fileContents) {
|
|||
|
||||
// Return the commit SHA for a branch
|
||||
async function getBranchCommit(branchName) {
|
||||
try {
|
||||
const res = await get(
|
||||
`repos/${config.repository}/git/refs/heads/${branchName}`
|
||||
);
|
||||
return res.body.object.sha;
|
||||
} catch (err) /* istanbul ignore next */ {
|
||||
return null;
|
||||
}
|
||||
const res = await get(
|
||||
`repos/${config.repository}/git/refs/heads/${branchName}`
|
||||
);
|
||||
return res.body.object.sha;
|
||||
}
|
||||
|
||||
async function getCommitDetails(commit) {
|
||||
|
|
Loading…
Reference in a new issue