Update uncivbot.yml

This commit is contained in:
Yair Morgenstern 2021-01-23 20:09:56 +02:00 committed by GitHub
parent d8592ac34e
commit 956c340226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,17 +82,21 @@ jobs:
async function createTranslationBranchIfNeeded() { async function createTranslationBranchIfNeeded() {
if (await branchExists(translations)) return if (await branchExists(translations)) return
var defaultBranch = await getDefaultBranch() var defaultBranch = await getDefaultBranch()
var currentHead = await github.git.getRef({ var currentHead = await github.git.getRef({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
ref: 'heads/' + defaultBranch }) ref: 'heads/' + defaultBranch })
var currentSha = currentHead.data.object.sha var currentSha = currentHead.data.object.sha
console.log("Current sha: " + currentSha) console.log("Current sha: " + currentSha)
await github.git.createRef({ await github.git.createRef({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
ref: `refs/heads/`+translations, ref: `refs/heads/`+translations,
sha: currentSha }) sha: currentSha })
await github.issues.createComment({ await github.issues.createComment({
issue_number: context.issue.number, issue_number: context.issue.number,
owner: context.repo.owner, owner: context.repo.owner,
@ -106,7 +110,8 @@ jobs:
repo: context.repo.repo, repo: context.repo.repo,
state: "open", state: "open",
}) })
translationPrs.forEach(pr => { console.log(pr) })
translationPrs.data.forEach(pr => { console.log(pr) })
} }