Skip to content

Commit 85756fa

Browse files
[repo-helper] Configuration Update (#18)
* Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. * Updated files with 'repo_helper'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent a9dfaae commit 85756fa

15 files changed

+124
-70
lines changed

.github/milestones.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env python
2+
3+
# stdlib
4+
import os
5+
import sys
6+
7+
# 3rd party
8+
from github3 import GitHub
9+
from github3.repos import Repository
10+
from packaging.version import InvalidVersion, Version
11+
12+
latest_tag = os.environ["GITHUB_REF_NAME"]
13+
14+
try:
15+
current_version = Version(latest_tag)
16+
except InvalidVersion:
17+
sys.exit()
18+
19+
gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"])
20+
repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1))
21+
22+
for milestone in repo.milestones(state="open"):
23+
try:
24+
milestone_version = Version(milestone.title)
25+
except InvalidVersion:
26+
continue
27+
if milestone_version == current_version:
28+
sys.exit(not milestone.update(state="closed"))

.github/stale.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ daysUntilStale: 180
77

88
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
99
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
10-
daysUntilClose: 180
10+
daysUntilClose: false
1111

1212
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
1313
onlyLabels: []
@@ -31,10 +31,10 @@ exemptAssignees: false
3131
staleLabel: stale
3232

3333
# Comment to post when marking as stale. Set to `false` to disable
34-
markComment: >
35-
This issue has been automatically marked as stale because it has not had
36-
recent activity. It will be closed if no further activity occurs. Thank you
37-
for your contributions.
34+
markComment: false
35+
# This issue has been automatically marked as stale because it has not had
36+
# recent activity. It will be closed if no further activity occurs. Thank you
37+
# for your contributions.
3838

3939
# Comment to post when removing the stale label.
4040
# unmarkComment: >

.github/workflows/cleanup.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/flake8.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
pull_request:
1112

1213
permissions:

.github/workflows/mypy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
pull_request:
1112

1213
permissions:

.github/workflows/python_ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011

1112
pull_request:
1213

1314
permissions:
1415
actions: write
16+
issues: write
1517
contents: read
1618

1719
jobs:
@@ -20,13 +22,13 @@ jobs:
2022
runs-on: "windows-2019"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.10.0-rc.1,pypy-3.6,pypy-3.7'
25+
USING_COVERAGE: '3.10,pypy-3.6,pypy-3.7'
2426

2527
strategy:
2628
fail-fast: False
2729
matrix:
2830
config:
29-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
31+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3032
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3133
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3234

.github/workflows/python_ci_linux.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011
tags:
1112
- '*'
1213
pull_request:
1314

1415
permissions:
1516
actions: write
17+
issues: write
1618
contents: read
1719

1820
jobs:
@@ -21,13 +23,13 @@ jobs:
2123
runs-on: "ubuntu-20.04"
2224
continue-on-error: ${{ matrix.config.experimental }}
2325
env:
24-
USING_COVERAGE: '3.10.0-rc.1,pypy-3.6,pypy-3.7'
26+
USING_COVERAGE: '3.10,pypy-3.6,pypy-3.7'
2527

2628
strategy:
2729
fail-fast: False
2830
matrix:
2931
config:
30-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
32+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3133
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3234
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3335

@@ -77,21 +79,21 @@ jobs:
7779

7880
- name: Setup Python 🐍
7981
uses: "actions/setup-python@v2"
82+
if: startsWith(github.ref, 'refs/tags/')
8083
with:
8184
python-version: 3.8
82-
if: startsWith(github.ref, 'refs/tags/')
8385

8486
- name: Install dependencies 🔧
87+
if: startsWith(github.ref, 'refs/tags/')
8588
run: |
8689
python -m pip install --upgrade pip setuptools wheel
8790
python -m pip install --upgrade tox
88-
if: startsWith(github.ref, 'refs/tags/')
8991
9092
- name: Build distributions 📦
93+
if: startsWith(github.ref, 'refs/tags/')
9194
run: |
9295
tox -e build
9396
94-
if: startsWith(github.ref, 'refs/tags/')
9597
9698
- name: Upload distribution to PyPI 🚀
9799
if: startsWith(github.ref, 'refs/tags/')
@@ -100,3 +102,11 @@ jobs:
100102
user: __token__
101103
password: ${{ secrets.PYPI_TOKEN }}
102104
skip_existing: true
105+
106+
- name: Close milestone 🚪
107+
if: startsWith(github.ref, 'refs/tags/')
108+
run: |
109+
python -m pip install --upgrade github3.py packaging
110+
python .github/milestones.py
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/python_ci_macos.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
branches-ignore:
88
- 'repo-helper-update'
99
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
1011

1112
pull_request:
1213

1314
permissions:
1415
actions: write
16+
issues: write
1517
contents: read
1618

1719
jobs:
@@ -20,14 +22,13 @@ jobs:
2022
runs-on: "macos-latest"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.10.0-rc.1,pypy-3.6,pypy-3.7'
25+
USING_COVERAGE: '3.10,pypy-3.7'
2426

2527
strategy:
2628
fail-fast: False
2729
matrix:
2830
config:
29-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
30-
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
31+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3132
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3233

3334
steps:

.pre-commit-config.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exclude: ^$
55

66
repos:
77
- repo: https://github.com/repo-helper/pyproject-parser
8-
rev: v0.4.1
8+
rev: v0.4.3
99
hooks:
1010
- id: reformat-pyproject
1111

@@ -30,7 +30,7 @@ repos:
3030
- id: end-of-file-fixer
3131

3232
- repo: https://github.com/domdfcoding/pre-commit-hooks
33-
rev: v0.2.1
33+
rev: v0.3.0
3434
hooks:
3535
- id: requirements-txt-sorter
3636
args:
@@ -40,7 +40,7 @@ repos:
4040
- id: bind-requirements
4141

4242
- repo: https://github.com/domdfcoding/flake8-dunder-all
43-
rev: v0.1.7
43+
rev: v0.1.8
4444
hooks:
4545
- id: ensure-dunder-all
4646
files: ^pytest_mypy_plugins_shim/.*\.py$
@@ -51,7 +51,7 @@ repos:
5151
- id: flake2lint
5252

5353
- repo: https://github.com/pre-commit/pygrep-hooks
54-
rev: v1.8.0
54+
rev: v1.9.0
5555
hooks:
5656
- id: python-no-eval
5757
- id: rst-backticks
@@ -67,13 +67,18 @@ repos:
6767
- --keep-runtime-typing
6868

6969
- repo: https://github.com/Lucas-C/pre-commit-hooks
70-
rev: v1.1.10
70+
rev: v1.1.13
7171
hooks:
7272
- id: remove-crlf
7373
- id: forbid-crlf
7474

75-
- repo: https://github.com/repo-helper/formate
76-
rev: v0.4.9
75+
- repo: https://github.com/python-formate/snippet-fmt
76+
rev: v0.1.4
77+
hooks:
78+
- id: snippet-fmt
79+
80+
- repo: https://github.com/python-formate/formate
81+
rev: v0.4.10
7782
hooks:
7883
- id: formate
7984
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ See https://github.com/TypedDjango/pytest-mypy-plugins for the actual pytest plu
4848
:target: https://github.com/python-coincidence/pytest-mypy-plugins-shim/actions?query=workflow%3A%22mypy%22
4949
:alt: mypy status
5050

51-
.. |requires| image:: https://requires.io/github/python-coincidence/pytest-mypy-plugins-shim/requirements.svg?branch=master
52-
:target: https://requires.io/github/python-coincidence/pytest-mypy-plugins-shim/requirements/?branch=master
51+
.. |requires| image:: https://dependency-dash.herokuapp.com/github/python-coincidence/pytest-mypy-plugins-shim/badge.svg
52+
:target: https://dependency-dash.herokuapp.com/github/python-coincidence/pytest-mypy-plugins-shim/
5353
:alt: Requirements Status
5454

5555
.. |codefactor| image:: https://img.shields.io/codefactor/grade/github/python-coincidence/pytest-mypy-plugins-shim?logo=codefactor
@@ -87,7 +87,7 @@ See https://github.com/TypedDjango/pytest-mypy-plugins for the actual pytest plu
8787
:target: https://github.com/python-coincidence/pytest-mypy-plugins-shim/commit/master
8888
:alt: GitHub last commit
8989

90-
.. |maintained| image:: https://img.shields.io/maintenance/yes/2021
90+
.. |maintained| image:: https://img.shields.io/maintenance/yes/2022
9191
:alt: Maintenance
9292

9393
.. |pypi-downloads| image:: https://img.shields.io/pypi/dm/pytest-mypy-plugins-shim

0 commit comments

Comments
 (0)