Skip to content

Commit a2c053b

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'. Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
1 parent 7fdd5b4 commit a2c053b

23 files changed

+369
-134
lines changed

.bumpversion.cfg

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ current_version = 0.0.4
33
commit = True
44
tag = True
55

6-
[bumpversion:file:__pkginfo__.py]
7-
86
[bumpversion:file:README.rst]
97

108
[bumpversion:file:repo_helper.yml]
9+
10+
[bumpversion:file:pyproject.toml]
11+
search = version = "{current_version}"
12+
replace = version = "{new_version}"
13+
14+
[bumpversion:file:setup.cfg]
15+
search = version = {current_version}
16+
replace = version = {new_version}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ THE ISSUE WILL BE CLOSED IF INSUFFICIENT INFORMATION IS PROVIDED.
1717

1818

1919
## Steps to Reproduce
20-
<!--Please add a series of steps to reproduce the issue-->
20+
<!--Please add a series of steps to reproduce the issue.
21+
22+
If possible, please include a small, self-contained reproduction.
23+
-->
2124

2225
1.
2326
2.
@@ -41,7 +44,7 @@ THE ISSUE WILL BE CLOSED IF INSUFFICIENT INFORMATION IS PROVIDED.
4144
* webcolors-stubs:
4245

4346
## Installation source
44-
<!-- e.g. Github repository, Github Releases, PyPI/pip, Anaconda/conda -->
47+
<!-- e.g. GitHub repository, GitHub Releases, PyPI/pip, Anaconda/conda -->
4548

4649

4750
## Other Additional Information:

.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: 6 additions & 6 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: []
@@ -28,13 +28,13 @@ exemptMilestones: false
2828
exemptAssignees: false
2929

3030
# Label to use when marking as stale
31-
staleLabel: wontfix
31+
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: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,47 @@ name: Flake8
44

55
on:
66
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
711
pull_request:
8-
branches: ["master"]
12+
13+
permissions:
14+
contents: read
915

1016
jobs:
1117
Run:
1218
name: "Flake8"
13-
runs-on: "ubuntu-18.04"
19+
runs-on: "ubuntu-20.04"
1420

1521
steps:
1622
- name: Checkout 🛎️
1723
uses: "actions/checkout@v2"
1824

25+
- name: Check for changed files
26+
uses: dorny/paths-filter@v2
27+
id: changes
28+
with:
29+
list-files: "json"
30+
filters: |
31+
code:
32+
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
33+
1934
- name: Setup Python 🐍
35+
if: steps.changes.outputs.code == 'true'
2036
uses: "actions/setup-python@v2"
2137
with:
22-
python-version: "3.8"
38+
python-version: "3.6"
2339

2440
- name: Install dependencies 🔧
41+
if: steps.changes.outputs.code == 'true'
2542
run: |
2643
python -VV
2744
python -m site
2845
python -m pip install --upgrade pip setuptools wheel
2946
python -m pip install tox
3047
3148
- name: "Run Flake8"
32-
run: "python -m tox -e lint -- --format github"
49+
if: steps.changes.outputs.code == 'true'
50+
run: "python -m tox -e lint -s false -- --format github"

.github/workflows/mypy.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ name: mypy
44

55
on:
66
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
711
pull_request:
8-
branches: ["master"]
12+
13+
permissions:
14+
contents: read
915

1016
jobs:
1117
Run:
@@ -14,14 +20,24 @@ jobs:
1420

1521
strategy:
1622
matrix:
17-
os: ['windows-2019', 'macos-latest', 'ubuntu-20.04']
23+
os: ['ubuntu-20.04', 'windows-2019']
1824
fail-fast: false
1925

2026
steps:
2127
- name: Checkout 🛎️
2228
uses: "actions/checkout@v2"
2329

30+
- name: Check for changed files
31+
uses: dorny/paths-filter@v2
32+
id: changes
33+
with:
34+
list-files: "json"
35+
filters: |
36+
code:
37+
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
38+
2439
- name: Setup Python 🐍
40+
if: steps.changes.outputs.code == 'true'
2541
uses: "actions/setup-python@v2"
2642
with:
2743
python-version: "3.6"
@@ -31,7 +47,8 @@ jobs:
3147
python -VV
3248
python -m site
3349
python -m pip install --upgrade pip setuptools wheel
34-
python -m pip install --upgrade tox virtualenv
50+
python -m pip install --upgrade tox virtualenv!=20.16.0
3551
3652
- name: "Run mypy"
37-
run: "python -m tox -e mypy"
53+
if: steps.changes.outputs.code == 'true'
54+
run: "python -m tox -e mypy -s false"

.github/workflows/octocheese.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
name: "GitHub Releases"
55
on:
6-
push:
7-
branches: ["master"]
86
schedule:
9-
- cron: 0 12 * * 2,4,6
7+
- cron: 0 12 * * *
108

119
jobs:
1210
Run:

.github/workflows/python_ci.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,25 @@ name: Windows
44

55
on:
66
push:
7+
branches-ignore:
8+
- 'repo-helper-update'
9+
- 'pre-commit-ci-update-config'
10+
- 'imgbot'
11+
712
pull_request:
8-
branches: ["master"]
13+
14+
permissions:
15+
actions: write
16+
issues: write
17+
contents: read
918

1019
jobs:
1120
tests:
1221
name: "windows-2019 / Python ${{ matrix.config.python-version }}"
1322
runs-on: "windows-2019"
1423
continue-on-error: ${{ matrix.config.experimental }}
1524
env:
16-
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10.0-alpha.5,pypy-3.6'
25+
USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,pypy-3.6'
1726

1827
strategy:
1928
fail-fast: False
@@ -23,24 +32,38 @@ jobs:
2332
- {python-version: "3.7", testenvs: "py37,build", experimental: False}
2433
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
2534
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
26-
- {python-version: "3.10.0-alpha.5", testenvs: "py310-dev,build", experimental: True}
35+
- {python-version: "3.10", testenvs: "py310-dev,build", experimental: True}
2736
- {python-version: "pypy-3.6", testenvs: "pypy3,build", experimental: False}
2837

2938
steps:
3039
- name: Checkout 🛎️
3140
uses: "actions/checkout@v2"
3241

42+
- name: Check for changed files
43+
if: startsWith(github.ref, 'refs/tags/') != true
44+
uses: dorny/paths-filter@v2
45+
id: changes
46+
with:
47+
list-files: "json"
48+
filters: |
49+
code:
50+
- '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)'
51+
3352
- name: Setup Python 🐍
53+
id: setup-python
54+
if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }}
3455
uses: "actions/setup-python@v2"
3556
with:
3657
python-version: "${{ matrix.config.python-version }}"
3758

3859
- name: Install dependencies 🔧
60+
if: steps.setup-python.outcome == 'success'
3961
run: |
4062
python -VV
4163
python -m site
4264
python -m pip install --upgrade pip setuptools wheel
43-
python -m pip install --upgrade tox virtualenv
65+
python -m pip install --upgrade tox virtualenv!=20.16.0
4466
4567
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
46-
run: python -m tox -e "${{ matrix.config.testenvs }}"
68+
if: steps.setup-python.outcome == 'success'
69+
run: python -m tox -e "${{ matrix.config.testenvs }}" -s false

0 commit comments

Comments
 (0)