update helper-bot for gh-helpers v0.2

This commit is contained in:
extremeheat 2024-03-28 16:06:06 -04:00 committed by GitHub
commit a7ae528c16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,10 +103,10 @@ 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.')
@ -114,7 +114,7 @@ async function fetchLatest () {
}
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
@ -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)