Skip to content

Commit

Permalink
update helper-bot for gh-helpers v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Mar 28, 2024
1 parent 184339b commit a7ae528
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/helper-bot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,18 @@ async function fetchLatest () {

const title = `Support Minecraft ${result.version}`

const issueStatus = await helper.getIssueStatus({ title })
const issueStatus = await helper.findIssue({ title }) || {}

if (supportedVersions.includes(version)) {
if (issueStatus.open) {
if (issueStatus.isOpen) {
helper.close(issueStatus.id, `Closing as ${version} is now supported`)
}
console.log('Latest version is supported.')
return
}


if (issueStatus.closed) {
if (issueStatus.isClosed) {
// We already made an issue, but someone else already closed it, don't do anything else
console.log('I already made an issue, but it was closed')
return
Expand All @@ -127,7 +127,7 @@ async function fetchLatest () {
CloudburstMC: getCommitsInRepo('CloudburstMC/Protocol', version, currentVersionReleaseDate)
})

if (issueStatus.open) {
if (issueStatus.isOpen) {
helper.updateIssue(issueStatus.id, issuePayload)
} else {
helper.createIssue(issuePayload)
Expand Down

0 comments on commit a7ae528

Please sign in to comment.