Hopefully fix checks triggering for crowdin download

This commit is contained in:
Devon R 2022-04-18 22:21:48 +01:00 committed by GitHub
parent 6e6d16093c
commit 54d2ff9caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 20 deletions

View File

@ -3,7 +3,7 @@ name: build
on:
push:
pull_request:
types: [ opened, synchronize ]
types: [ opened, reopened, synchronize ]
jobs:
dists-and-docs:

View File

@ -3,7 +3,7 @@ name: lint
on:
push:
pull_request:
types: [ opened, synchronize ]
types: [ opened, reopened, synchronize ]
jobs:
check:

View File

@ -7,22 +7,16 @@ module.exports = (async function ({github, context}) {
return;
}
// Close the PR
github.issues.update({
issue_number: pr_number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'closed'
});
for (const state of ['closed', 'open']) {
// Wait a moment for GitHub to process the previous action..
await new Promise(r => setTimeout(r, 5000));
// Wait a moment for GitHub to process it...
await new Promise(r => setTimeout(r, 2000));
// Then reopen the PR so it runs CI
github.issues.update({
issue_number: pr_number,
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
});
// Close the PR
github.issues.update({
issue_number: pr_number,
owner: context.repo.owner,
repo: context.repo.repo,
state
});
}
})

View File

@ -3,7 +3,7 @@ name: test
on:
push:
pull_request:
types: [ opened, synchronize ]
types: [ opened, reopened, synchronize ]
jobs:
pytest: