fix: match do contexto checks por substring (Forgejo usa 'CI / checks (pull_request)')
Some checks failed
CI / checks (pull_request) Successful in 11s
CI / deploy (pull_request) Has been skipped
Agent PR Ready + auto-merge / ready-automerge (pull_request) Failing after 51s

This commit is contained in:
Francisco Solla 2026-08-17 21:33:05 -03:00
parent ca75a43b54
commit a780f02245

View file

@ -295,7 +295,7 @@ export const createApi = ({ base, token, repository, fetchImpl } = {}) => {
const names = failed.map((entry) => entry.context).join(', ')
throw new Error(`Checks falharam no PR #${number}: ${names}`)
}
const required = relevant.find((entry) => entry.context === requiredContext)
const required = relevant.find((entry) => entry.context.includes(requiredContext))
if (required && required.state === 'success' && pending.length === 0) return pr
if (Date.now() - started > timeoutMs) {
throw new Error(`Timeout esperando checks do PR #${number}.`)