Browse Source

Hopefully fix checks triggering for crowdin download

pull/7903/head
Devon R 3 years ago
committed by GitHub
parent
commit
54d2ff9caa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/build.yml
  2. 2
      .github/workflows/lint.yml
  3. 18
      .github/workflows/scripts/close_and_reopen_pr.js
  4. 2
      .github/workflows/test.yml

2
.github/workflows/build.yml

@ -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:

2
.github/workflows/lint.yml

@ -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:

18
.github/workflows/scripts/close_and_reopen_pr.js

@ -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...
await new Promise(r => setTimeout(r, 2000));
// Then reopen the PR so it runs CI // Close the PR
github.issues.update({ github.issues.update({
issue_number: pr_number, issue_number: pr_number,
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
state: 'open' state
}); });
}
}) })

2
.github/workflows/test.yml

@ -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:

Loading…
Cancel
Save