Skip to content

Commit e0c0a99

Browse files
[repo-helper] Configuration Update (#24)
* 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 cc16c53 commit e0c0a99

19 files changed

+150
-74
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/docs_test_action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches-ignore:
77
- 'repo-helper-update'
88
- 'pre-commit-ci-update-config'
9+
- 'imgbot'
910
pull_request:
1011

1112
permissions:
@@ -16,7 +17,7 @@ jobs:
1617
runs-on: ubuntu-latest
1718
steps:
1819
- name: Checkout 🛎️
19-
uses: "actions/checkout@v1"
20+
uses: "actions/checkout@v2"
2021

2122
- name: Check for changed files
2223
uses: dorny/paths-filter@v2

.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,7 +22,7 @@ jobs:
2022
runs-on: "windows-2019"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.1'
25+
USING_COVERAGE: '3.7,3.8,3.9,3.10'
2426

2527
strategy:
2628
fail-fast: False
@@ -29,7 +31,7 @@ jobs:
2931
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3032
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3133
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
32-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
34+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3335

3436
steps:
3537
- name: Checkout 🛎️

.github/workflows/python_ci_linux.yml

Lines changed: 20 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,7 +23,7 @@ jobs:
2123
runs-on: "ubuntu-20.04"
2224
continue-on-error: ${{ matrix.config.experimental }}
2325
env:
24-
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.1'
26+
USING_COVERAGE: '3.7,3.8,3.9,3.10'
2527

2628
strategy:
2729
fail-fast: False
@@ -30,7 +32,7 @@ jobs:
3032
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3133
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3234
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
33-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
35+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3436

3537
steps:
3638
- name: Checkout 🛎️
@@ -97,21 +99,26 @@ jobs:
9799
path: coverage
98100

99101
- name: Display structure of downloaded files
102+
id: show
100103
run: ls -R
101104
working-directory: coverage
105+
continue-on-error: true
102106

103107
- name: Combine Coverage 👷
108+
if: ${{ steps.show.outcome != 'failure' }}
104109
run: |
105110
shopt -s globstar
106111
python -m coverage combine coverage/**/.coverage
107112
108113
- name: "Upload Combined Coverage Artefact 🚀"
114+
if: ${{ steps.show.outcome != 'failure' }}
109115
uses: actions/upload-artifact@v2
110116
with:
111117
name: "combined-coverage"
112118
path: .coverage
113119

114120
- name: "Upload Combined Coverage to Coveralls"
121+
if: ${{ steps.show.outcome != 'failure' }}
115122
env:
116123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117124
run: |
@@ -128,21 +135,21 @@ jobs:
128135

129136
- name: Setup Python 🐍
130137
uses: "actions/setup-python@v2"
138+
if: startsWith(github.ref, 'refs/tags/')
131139
with:
132140
python-version: 3.8
133-
if: startsWith(github.ref, 'refs/tags/')
134141

135142
- name: Install dependencies 🔧
143+
if: startsWith(github.ref, 'refs/tags/')
136144
run: |
137145
python -m pip install --upgrade pip setuptools wheel
138146
python -m pip install --upgrade tox
139-
if: startsWith(github.ref, 'refs/tags/')
140147
141148
- name: Build distributions 📦
149+
if: startsWith(github.ref, 'refs/tags/')
142150
run: |
143151
tox -e build
144152
145-
if: startsWith(github.ref, 'refs/tags/')
146153
147154
- name: Upload distribution to PyPI 🚀
148155
if: startsWith(github.ref, 'refs/tags/')
@@ -151,3 +158,11 @@ jobs:
151158
user: __token__
152159
password: ${{ secrets.PYPI_TOKEN }}
153160
skip_existing: true
161+
162+
- name: Close milestone 🚪
163+
if: startsWith(github.ref, 'refs/tags/')
164+
run: |
165+
python -m pip install --upgrade github3.py packaging
166+
python .github/milestones.py
167+
env:
168+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/python_ci_macos.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,7 +22,7 @@ jobs:
2022
runs-on: "macos-latest"
2123
continue-on-error: ${{ matrix.config.experimental }}
2224
env:
23-
USING_COVERAGE: '3.7,3.8,3.9,3.10.0-rc.1'
25+
USING_COVERAGE: '3.7,3.8,3.9,3.10'
2426

2527
strategy:
2628
fail-fast: False
@@ -29,7 +31,7 @@ jobs:
2931
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
3032
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
3133
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
32-
- {python-version: "3.10.0-rc.1", testenvs: "py310-dev,build", experimental: True}
34+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
3335

3436
steps:
3537
- name: Checkout 🛎️

.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: ^tox_recreate_hook/.*\.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$

0 commit comments

Comments
 (0)