mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-06 07:31:26 +07:00
Update uncivbot.yml
This commit is contained in:
parent
ede55084ab
commit
9e3e192098
20
.github/workflows/uncivbot.yml
vendored
20
.github/workflows/uncivbot.yml
vendored
@ -112,13 +112,27 @@ jobs:
|
||||
})
|
||||
|
||||
translationPrs.data.forEach(pr => {
|
||||
console.log(pr.labels)
|
||||
if (pr.labels.some(label => label.name == "mergeable translation"))
|
||||
console.log(pr.title)
|
||||
await tryMergePr(pr)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
async function tryMergePr(pr){
|
||||
if (pr.base.ref != translations)
|
||||
await github.pulls.update({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: pr.number,
|
||||
base: translations })
|
||||
|
||||
if (pr.data.state == "open" && pr.data.mergeable)
|
||||
await context.github.pulls.merge(
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: pr.number,
|
||||
merge_method: "squash" })
|
||||
}
|
||||
|
||||
await createTranslationBranchIfNeeded()
|
||||
await mergeExistingTranslationsIntoBranch()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user