github|setup: Introduce pre-commit.yml to force pre-commit to pass (#8811)

* github: Add `pre-commit.yml`

This runs `pre-commit` as github action for all PRs and on pushes to 
`main`.

* github: Drop trailing whitespaces in `stale_issue.yml`

* setup: Ignore type errors for `setup` call
This commit is contained in:
dustinface 2021-10-13 19:26:15 +02:00 committed by GitHub
parent ab7d07ad30
commit 5b7bb5e0f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 7 deletions

14
.github/workflows/pre-commit.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3

View File

@ -22,16 +22,16 @@ jobs:
stale-pr-label: stale-pr
remove-stale-when-updated: true
stale-issue-message: >
'This issue has been flagged as stale, as there has been no
activity on it in the last 14 days. If this issue is still
'This issue has been flagged as stale, as there has been no
activity on it in the last 14 days. If this issue is still
affecting you and in need of further review, please comment
on it with an update to keep it open.'
close-issue-message: >
'This issue was automatically closed because it has been flagged
'This issue was automatically closed because it has been flagged
as stale, and subsequently passed 7 days with no further activity
from the submitter or watchers.'
stale-pr-message: >
'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given a
stale-pr label and should be manually reviewed by the relevant
'This PR has been flagged as stale due to no activity for over 60
days. It will not be automatically closed, but it has been given a
stale-pr label and should be manually reviewed by the relevant
parties.'

View File

@ -120,4 +120,4 @@ kwargs = dict(
if __name__ == "__main__":
setup(**kwargs)
setup(**kwargs) # type: ignore