Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .bumpversion.cfg

This file was deleted.

5 changes: 5 additions & 0 deletions .changes/0.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 0.1.0 - 2020-03-08
### Added
* Add SESSION_TIMEOUT_REDIRECT to set a custom URL for redirect users which have an expired session. See #9
### Changed
* Update GitHub Actions CI/CD
8 changes: 8 additions & 0 deletions .changes/header.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

Older releases are documented in [CHANGES](CHANGES).
Empty file added .changes/unreleased/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions .changes/unreleased/Removed-20261026-222116.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kind: Removed
body: Drop support for Python < 3.11 and Django < 5.2, and drop the six dependency
time: 2026-10-26T22:21:16.768189+01:00
39 changes: 39 additions & 0 deletions .changie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '* {{.Body}}'
kinds:
- label: Added
auto: minor
- label: Changed
auto: major
- label: Deprecated
auto: minor
- label: Removed
auto: major
- label: Fixed
auto: patch
- label: Security
auto: patch
- label: Dependency
auto: patch
# uv.lock also contains the version, the release workflow runs `uv lock`
replacements:
- path: pyproject.toml
find: '^version = ".*"'
replace: 'version = "{{.VersionNoPrefix}}"'
- path: src/django_session_timeout/__init__.py
find: '^__version__ = ".*"'
replace: '__version__ = "{{.VersionNoPrefix}}"'
- path: docs/conf.py
find: "^version = '.*'"
replace: "version = '{{.VersionNoPrefix}}'"
newlines:
afterChangelogHeader: 1
beforeChangelogVersion: 1
endOfVersion: 1
envPrefix: CHANGIE_
49 changes: 49 additions & 0 deletions .github/workflows/dependabot-changie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Dependabot add changie file
on:
pull_request:
types: [opened]

permissions:
pull-requests: write
issues: write
repository-projects: write
contents: write

jobs:
dependabot-changie:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Create release app token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-contents: write

- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}
# git-auto-commit-action pushes with these credentials
persist-credentials: true

- name: Fetch Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Create change file
uses: miniscruff/changie-action@3223cb29b92a0972dedc864ace3da01e04780ae4 # v3.0.1
with:
version: latest
args: new --body "${{ github.event.pull_request.title }}" --kind Dependency

- uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
with:
commit_message: "chore(deps): add changelog for dependabot updates"
commit_user_name: "dependabot[bot]"
commit_user_email: "dependabot[bot]@users.noreply.github.com"
40 changes: 40 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,43 @@ jobs:
env:
PYTHON: ${{ matrix.python }}
DJANGO: ${{ matrix.django }}

release:
runs-on: ubuntu-latest
needs: [format, test]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
permissions:
contents: read
concurrency:
group: release
cancel-in-progress: false
steps:
- name: Create release app token
id: app-token
uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
with:
app-id: ${{ vars.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
enable-cache: false

# Creates or updates the release PR, or tags and releases the version
# once it is merged. The GitHub release is created with the app token,
# so it triggers python-release.yml, which publishes to PyPI.
- name: Release
uses: labd/changie-release-action@059406879b04f6e073547b325fbbff9a573038e3 # v2.0.0
with:
github-token: ${{ steps.app-token.outputs.token }}
# uv.lock contains the project version as well
version-command: uv lock
create-release: true
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

Older releases are documented in [CHANGES](CHANGES).


## 0.1.0 - 2020-03-08
### Added
* Add SESSION_TIMEOUT_REDIRECT to set a custom URL for redirect users which have an expired session. See #9
### Changed
* Update GitHub Actions CI/CD
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
New releases are documented in CHANGELOG.md, which is generated by changie.

0.1.0 (2020-03-08)
------------------
- Add SESSION_TIMEOUT_REDIRECT to set a custom URL for redirect users which
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ To redirect to a custom URL define the following setting:
```python
SESSION_TIMEOUT_REDIRECT = 'your_redirect_url_here/'
```

## Releasing

Changes are tracked with [changie](https://changie.dev/). Add a changelog
entry to every pull request with a user-facing change:

```shell
changie new
```

When entries are merged to the default branch, a release pull request is
opened (or updated) automatically. Merging that pull request tags the release,
creates the GitHub release and publishes the package to PyPI.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ classifiers = [
[project.urls]
Homepage = "https://github.com/labd/django-session-timeout"
Documentation = "https://django-session-timeout.readthedocs.io/"
Changelog = "https://github.com/labd/django-session-timeout/blob/master/CHANGES"
Changelog = "https://github.com/labd/django-session-timeout/blob/master/CHANGELOG.md"

[dependency-groups]
dev = [
Expand Down Expand Up @@ -68,6 +68,7 @@ packages = ["src/django_session_timeout"]
include = [
"src/django_session_timeout",
"tests",
"CHANGELOG.md",
"CHANGES",
"LICENSE",
"README.md",
Expand Down
Loading