Skip to content

Commit e315676

Browse files
committed
add CoC update action
1 parent 1954e73 commit e315676

File tree

3 files changed

+97
-29
lines changed

3 files changed

+97
-29
lines changed

.github/workflows/update_coc.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Update Code of Conduct
2+
3+
on:
4+
# Run every Sunday at midnight UTC (00:00) - triggered by webhook?
5+
schedule:
6+
- cron: '0 0 * * 0'
7+
8+
permissions:
9+
contents: write
10+
issues: write
11+
pull-requests: write
12+
13+
jobs:
14+
update_code_of_conduct:
15+
if: github.ref == 'refs/heads/main'
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout
21+
22+
- name: Fetch CODE_OF_CONDUCT.md from django-commons
23+
run: |
24+
curl -o fetched_code_of_conduct.md https://raw.githubusercontent.com/django-commons/membership/main/CODE_OF_CONDUCT.md
25+
26+
- name: Check if CODE_OF_CONDUCT.md has changed
27+
id: check_changes
28+
run: |
29+
if cmp -s fetched_code_of_conduct.md CODE_OF_CONDUCT.md; then
30+
echo "No changes in CODE_OF_CONDUCT.md"
31+
echo "::set-output name=changed::false"
32+
else
33+
echo "CODE_OF_CONDUCT.md has changed"
34+
echo "::set-output name=changed::true"
35+
fi
36+
37+
# Step 4: Create a new branch and commit the updated file (if it changed)
38+
- name: Create branch and commit changes
39+
if: steps.check_changes.outputs.changed == 'true'
40+
run: |
41+
git config user.name "GitHub Actions Bot"
42+
git config user.email "[email protected]"
43+
git checkout -b update-code-of-conduct
44+
cp fetched_code_of_conduct.md CODE_OF_CONDUCT.md
45+
git add CODE_OF_CONDUCT.md
46+
git commit -m "Update CODE_OF_CONDUCT.md"
47+
git push origin update-code-of-conduct
48+
49+
# Step 5: Create a pull request to merge the changes into the main branch
50+
- name: Create Pull Request
51+
if: steps.check_changes.outputs.changed == 'true'
52+
uses: peter-evans/create-pull-request
53+
with:
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
branch: update-code-of-conduct
56+
title: "Update Code of Conduct"
57+
body: "This PR updates the Code of Conduct with the latest version from the django-commons repository."
58+
base: main
59+
commit-message: "Update CODE_OF_CONDUCT.md from django-commons"

doc/source/changelog.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
Change Log
33
==========
44

5-
v2.2.2 (25-AUG-2024)
5+
v2.2.2 (2024-08-25)
66
====================
77

88
* Implemented `Support python 3.13 <https://github.com/bckohan/django-typer/issues/109>`_
99
* Fixed `typer > 0.12.5 toggles rich help renderings off by default <https://github.com/bckohan/django-typer/issues/108>`_
1010

11-
v2.2.1 (17-AUG-2024)
11+
v2.2.1 (2024-08-17)
1212
====================
1313

1414
* Fixed `Remove shell_complete monkey patch when upstream PR is merged. <https://github.com/bckohan/django-typer/issues/66>`_
1515

16-
v2.2.0 (26-JUL-2024)
16+
v2.2.0 (2024-07-26)
1717
====================
1818

1919
* Implemented `ModelObjectCompleter should optionally accept a QuerySet in place of a Model class. <https://github.com/bckohan/django-typer/issues/96>`_
2020

21-
v2.1.3 (15-JUL-2024)
21+
v2.1.3 (2024-07-15)
2222
====================
2323

2424
* Fixed `Move from django_typer to django_typer.management broke doc reference links. <https://github.com/bckohan/django-typer/issues/98>`_
2525
* Implemented `Support Django 5.1 <https://github.com/bckohan/django-typer/issues/97>`_
2626

27-
v2.1.2 (07-JUN-2024)
27+
v2.1.2 (2024-06-07)
2828
====================
2929

3030
* Fixed `Type hint kwargs to silence pylance warnings about partially unknown types <https://github.com/bckohan/django-typer/issues/93>`_
3131

32-
v2.1.1 (06-JUN-2024)
32+
v2.1.1 (2024-06-06)
3333
====================
3434

3535
* Fixed `handle = None does not work for mypy to silence type checkers <https://github.com/bckohan/django-typer/issues/90>`_
3636

37-
v2.1.0 (05-JUN-2024)
37+
v2.1.0 (2024-06-05)
3838
====================
3939

4040
.. warning::
@@ -55,18 +55,18 @@ v2.1.0 (05-JUN-2024)
5555
* Implemented `Move core code out of __init__.py into management/__init__.py <https://github.com/bckohan/django-typer/issues/81>`_
5656
* Fixed `Typer(help="") doesnt work. <https://github.com/bckohan/django-typer/issues/78>`_
5757

58-
v2.0.2 (03-JUN-2024)
58+
v2.0.2 (2024-06-03)
5959
====================
6060

6161
* Fixed `class help attribute should be type hinted to allow a lazy translation string. <https://github.com/bckohan/django-typer/issues/85>`_
6262

6363

64-
v2.0.1 (31-MAY-2024)
64+
v2.0.1 (2024-05-31)
6565
====================
6666

6767
* Fixed `Readme images are broken. <https://github.com/bckohan/django-typer/issues/77>`_
6868

69-
v2.0.0 (31-MAY-2024)
69+
v2.0.0 (2024-05-31)
7070
====================
7171

7272
This major version release, includes an extensive internal refactor, numerous bug fixes and the
@@ -91,18 +91,18 @@ addition of a plugin-based extension pattern.
9191
* Implemented `Add completer/parser for GenericIPAddressField. <https://github.com/bckohan/django-typer/issues/12>`_
9292

9393

94-
v1.1.2 (22-APR-2024)
94+
v1.1.2 (2024-04-22)
9595
====================
9696

9797
* Fixed `Overridden common Django arguments fail to pass through when passed through call_command <https://github.com/bckohan/django-typer/issues/54>`_
9898

99-
v1.1.1 (11-APR-2024)
99+
v1.1.1 (2024-04-11)
100100
====================
101101

102102
* Implemented `Fix pyright type checking and add to CI <https://github.com/bckohan/django-typer/issues/51>`_
103103
* Implemented `Convert CONTRIBUTING.rst to markdown <https://github.com/bckohan/django-typer/issues/50>`_
104104

105-
v1.1.0 (03-APR-2024)
105+
v1.1.0 (2024-04-03)
106106
====================
107107

108108
* Implemented `Convert readme to markdown. <https://github.com/bckohan/django-typer/issues/48>`_
@@ -114,40 +114,40 @@ v1.0.9 (yanked)
114114

115115
* Fixed `Support typer 0.12.0 <https://github.com/bckohan/django-typer/issues/46>`_
116116

117-
v1.0.8 (26-MAR-2024)
117+
v1.0.8 (2024-03-26)
118118
====================
119119

120120
* Fixed `Support typer 0.10 and 0.11 <https://github.com/bckohan/django-typer/issues/45>`_
121121

122-
v1.0.7 (17-MAR-2024)
122+
v1.0.7 (2024-03-17)
123123
====================
124124

125125
* Fixed `Helps throw an exception when invoked from an absolute path that is not relative to the getcwd() <https://github.com/bckohan/django-typer/issues/44>`_
126126

127-
v1.0.6 (14-MAR-2024)
127+
v1.0.6 (2024-03-14)
128128
====================
129129

130130
* Fixed `prompt options on groups still prompt when given as named parameters on call_command <https://github.com/bckohan/django-typer/issues/43>`_
131131

132132

133-
v1.0.5 (14-MAR-2024)
133+
v1.0.5 (2024-03-14)
134134
====================
135135

136136
* Fixed `Options with prompt=True are prompted twice <https://github.com/bckohan/django-typer/issues/42>`_
137137

138138

139-
v1.0.4 (13-MAR-2024)
139+
v1.0.4 (2024-03-13)
140140
====================
141141

142142
* Fixed `Help sometimes shows full script path in Usage: when it shouldnt. <https://github.com/bckohan/django-typer/issues/40>`_
143143
* Fixed `METAVAR when ModelObjectParser supplied should default to model name <https://github.com/bckohan/django-typer/issues/39>`_
144144

145-
v1.0.3 (08-MAR-2024)
145+
v1.0.3 (2024-03-08)
146146
====================
147147

148148
* Fixed `Incomplete typing info for @command decorator <https://github.com/bckohan/django-typer/issues/33>`_
149149

150-
v1.0.2 (05-MAR-2024)
150+
v1.0.2 (2024-03-05)
151151
====================
152152

153153
* Fixed `name property on TyperCommand is too generic and should be private. <https://github.com/bckohan/django-typer/issues/37>`_
@@ -159,50 +159,50 @@ v1.0.2 (05-MAR-2024)
159159
* Fixed `Missing subcommand produces stack trace without --traceback. <https://github.com/bckohan/django-typer/issues/27>`_
160160
* Fixed `Allow handle() to be an initializer. <https://github.com/bckohan/django-typer/issues/24>`_
161161

162-
v1.0.1 (29-FEB-2024)
162+
v1.0.1 (2024-02-29)
163163
====================
164164

165165
* Fixed `shell_completion broken for click < 8.1 <https://github.com/bckohan/django-typer/issues/21>`_
166166

167-
v1.0.0 (26-FEB-2024)
167+
v1.0.0 (2024-02-26)
168168
====================
169169

170170
* Initial production/stable release.
171171

172-
v0.6.1b (24-FEB-2024)
172+
v0.6.1b (2024-02-24)
173173
=====================
174174

175175
* Incremental beta release - this is also the second release candidate for version 1.
176176
* Peg typer version to 0.9.x
177177

178-
v0.6.0b (23-FEB-2024)
178+
v0.6.0b (2024-02-23)
179179
=====================
180180

181181
* Incremental beta release - this is also the first release candidate for version 1.
182182

183183

184-
v0.5.0b (31-JAN-2024)
184+
v0.5.0b (2024-01-31)
185185
=====================
186186

187187
* Incremental Beta Release
188188

189-
v0.4.0b (08-JAN-2024)
189+
v0.4.0b (2024-01-08)
190190
=====================
191191

192192
* Incremental Beta Release
193193

194-
v0.3.0b (06-JAN-2024)
194+
v0.3.0b (2024-01-06)
195195
=====================
196196

197197
* Incremental Beta Release
198198

199-
v0.2.0b (04-JAN-2024)
199+
v0.2.0b (2024-01-04)
200200
=====================
201201

202202
* Incremental Beta Release
203203

204204

205-
v0.1.0b (05-DEC-2023)
205+
v0.1.0b (2023-12-05)
206206
=====================
207207

208208
* Initial Release (Beta)

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ classifiers = [
3636
"Topic :: Software Development :: Libraries :: Python Modules"
3737
]
3838

39+
40+
[project.urls]
41+
Homepage = "https://django-typer.readthedocs.io"
42+
Documentation = "https://django-typer.readthedocs.io"
43+
Repository = "https://github.com/bckohan/django-typer"
44+
Issues = "https://github.com/bckohan/django-typer/issues"
45+
Changelog = "https://django-typer.readthedocs.io/en/latest/changelog.html"
46+
Code_of_Conduct = "https://github.com/django-commons/membership/blob/main/CODE_OF_CONDUCT.md"
47+
3948
packages = [
4049
{ include = "django_typer" }
4150
]

0 commit comments

Comments
 (0)