mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
Add towncrier (#96)
* Add support for towncrier * Use correct command * Compare properly * Work within the correct directory * Try main * Try a fetch-depth of 0 * changelog * Fix default config * Update sample
This commit is contained in:
parent
b34130d7ea
commit
8bdf789553
20
.github/workflows/newsfile.yml
vendored
Normal file
20
.github/workflows/newsfile.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: Newsfile
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with: # Needed for comparison
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- run: pip install towncrier==19.2.0
|
||||
- name: ":newspaper: Newsfile"
|
||||
run: python3 -m towncrier.check --compare-with=origin/main
|
0
changelog.d/.gitkeep
Normal file
0
changelog.d/.gitkeep
Normal file
1
changelog.d/96.feature
Normal file
1
changelog.d/96.feature
Normal file
@ -0,0 +1 @@
|
||||
Add automatic changelog generation via [Towncrier](https://github.com/twisted/towncrier).
|
@ -70,6 +70,11 @@ passFile:
|
||||
# Run openssl genpkey -out passkey.pem -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096 to generate
|
||||
#
|
||||
passkey.pem
|
||||
bot:
|
||||
# (Optional) Define profile information for the bot user
|
||||
#
|
||||
displayname: GitHub Bot
|
||||
avatar: mxc://half-shot.uk/2876e89ccade4cb615e210c458e2a7a6883fe17d
|
||||
queue:
|
||||
# (Optional) Message queue / cache configuration options for large scale deployments
|
||||
#
|
||||
|
29
pyproject.toml
Normal file
29
pyproject.toml
Normal file
@ -0,0 +1,29 @@
|
||||
[tool.towncrier]
|
||||
filename = "CHANGELOG.md"
|
||||
directory = "changelog.d"
|
||||
issue_format = "[\\#{issue}](https://github.com/half-shot/matrix-hookshot/issues/{issue})"
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "feature"
|
||||
name = "Features"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "bugfix"
|
||||
name = "Bugfixes"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "doc"
|
||||
name = "Improved Documentation"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "removal"
|
||||
name = "Deprecations and Removals"
|
||||
showcontent = true
|
||||
|
||||
[[tool.towncrier.type]]
|
||||
directory = "misc"
|
||||
name = "Internal Changes"
|
||||
showcontent = true
|
3
scripts/changelog.sh
Executable file
3
scripts/changelog.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
VERSION=`python3 -c "import json; f = open('./package.json', 'r'); v = json.loads(f.read())['version']; f.close(); print(v)"`
|
||||
towncrier --version $VERSION $1
|
Loading…
x
Reference in New Issue
Block a user