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: on:
push: push:
pull_request: pull_request:
types: [ opened, synchronize ] types: [ opened, reopened, synchronize ]
jobs: jobs:
dists-and-docs: dists-and-docs:

View File

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

View File

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

View File

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