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

Commit

Permalink
fix(get-release): remove deprecated header
Browse files Browse the repository at this point in the history
  • Loading branch information
Realtin committed Feb 7, 2018
1 parent e8838f5 commit b719d61
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/get-release.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
const githubQueue = require('./github-queue')

module.exports = async function ({ installationId, owner, repo, version, sha }) {
const headers = {
Accept: 'application/vnd.github.machine-man-preview.v3.html+json'
}

const ghqueue = githubQueue(installationId)

let result
try {
result = await ghqueue.read(github => github.repos.getReleaseByTag({
headers,
owner,
repo,
tag: `v${version}`
}))
} catch (err) {
try {
result = await ghqueue.read(github => github.repos.getReleaseByTag({
headers,
owner,
repo,
tag: `${version}`
Expand All @@ -28,7 +22,6 @@ module.exports = async function ({ installationId, owner, repo, version, sha })
const { tag } = await ghqueue.read(github => github.gitdata.getTag({ owner, repo, sha }))

result = await ghqueue.read(github => github.repos.getReleaseByTag({
headers,
owner,
repo,
tag
Expand Down

0 comments on commit b719d61

Please sign in to comment.