diff --git a/.github/workflows/bumpversion.yml b/.github/workflows/bumpversion.yml new file mode 100644 index 0000000..74a5b8b --- /dev/null +++ b/.github/workflows/bumpversion.yml @@ -0,0 +1,74 @@ +name: Bump version +on: + push: + branches: + - master +jobs: + bumpversion: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.tag_version.outputs.new_version }} + previous_tag: ${{ steps.tag_version.outputs.previous_tag }} + bump_commit_sha: ${{ steps.bumpversion.outputs.commit_hash }} + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.DEDALO_PAT }} + - name: Get next version + id: tag_version + uses: mathieudutour/github-tag-action@v6.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + default_bump: false + default_prerelease_bump: false + dry_run: true + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Create bumpversion + if: steps.tag_version.outputs.new_version + run: | + pip install bumpversion + bumpversion --new-version ${{ steps.tag_version.outputs.new_version }} setup.cfg + - name: Update Changelog + if: steps.tag_version.outputs.new_version + uses: stefanzweifel/changelog-updater-action@v1.6.0 + with: + latest-version: ${{ steps.tag_version.outputs.new_tag }} + release-notes: ${{ steps.tag_version.outputs.changelog }} + - name: Commit bumpversion + id: bumpversion + if: steps.tag_version.outputs.new_version + uses: stefanzweifel/git-auto-commit-action@v4.14.1 + with: + branch: ${{ github.ref }} + commit_message: "docs(bumpversion): ${{ steps.tag_version.outputs.previous_tag }} → ${{ steps.tag_version.outputs.new_version }}" + file_pattern: setup.cfg CHANGELOG.md eox_tagging/* + release: + needs: bumpversion + if: needs.bumpversion.outputs.version + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.tag_version.outputs.new_tag }} + changelog: ${{ steps.tag_version.outputs.changelog }} + steps: + - uses: actions/checkout@v3 + with: + token: ${{ secrets.DEDALO_PAT }} + - name: Create tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + commit_sha: ${{ needs.bumpversion.outputs.bump_commit_sha }} + default_bump: false + default_prerelease_bump: false + - name: Create a GitHub release + if: steps.tag_version.outputs.new_tag + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: Release ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} + draft: true diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000..17e76cb --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,11 @@ +name: Lint Commit Messages +on: [pull_request] + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: wagoid/commitlint-github-action@v4.1.12 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..33dda30 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,25 @@ +name: labeler + +on: + pull_request: + branches: + - 'master' + +jobs: + labeler: + runs-on: ubuntu-latest + name: Label the PR size + steps: + - uses: CodelyTV/pr-size-labeler@v1.7.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + xs_max_size: '10' + s_max_size: '100' + m_max_size: '500' + l_max_size: '1000' + fail_if_xl: 'true' + message_if_xl: > + 'This PR exceeds the recommended size of 1000 lines. + Please make sure you are NOT addressing multiple issues with one PR. + Note this PR might be rejected due to its size.' + github_api_url: 'api.github.com' diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a75ebdf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,152 @@ +# 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/), +and this project adheres to ## [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [3.0.0] - 2021-11-17 + +### Added + +- **BREAKING CHANGE**: change backends defaults from Juniper to Lilac. + +## [2.3.0] - 2021-10-11 + +### Added +- Support for tagging Certificate objects. + +## [2.2.0] - 2021-05-13 + +### Added +- Lilac compatibility. + +### Fix + +- Removed headers in audited destroy method. + +## [2.1.0] - 2021-04-29 + +### Fix + +- Removed headers in audited method. + +## [2.0.1] - 2021-02-11 + +### Fix + +- Fix eox-audit-model dependency in the settings + +## [2.0.0] - 2021-02-10 + +### Added +----- +- Swagger support alongside REST API documentation + +## [1.2.0] - 2021-02-03 + +### Added + +- Added expiration_date, tag_value and tag_type filters. + +Changed + +- Fixed courseenrollments filters and refactor the rest. +- Removed `required` from access field in serializer. + + +## [1.1.0] - 2020-12-16 + +### Added + +- Permissions compatibility with DOT. + + +## [1.0.0] - 2020-11-13 + +### Added + +- Migration compatibility with PY35. + + +## [0.10.1] - 2020-11-12 + +Changed + +- Fixed not loading correct settings when testing. + +## [0.10.0] - 2020-10-13 + +### Added + +- Added support for filters in django2.2 + +## [0.9.0] - 2020-10-05 + +### Added + +- Added support for Django 2.2. + +## [0.8.0] - 2020-09-30 + +### Added + +- Adding bearer_authentication to support django-oauth2-provider and django-oauth-toolkit + +## [0.7.0] - 2020-08-05 + +Changed + +- Fixed case sensitive issue in the tag serializer with the fields `target_type` and `owner_type`. + +## [0.6.0] - 2020-08-03 + +### Added + +- The user can force a value in a field using the configuration. + +Changed + +- Fixed datetime filters for activation_date and creation_date. + +## [0.5.0] - 2020-07-14 + +Changed + +- Using - instead of _ for the urls namespace. + +## [0.4.0] - 2020-07-14 + +### Added + +- Added eox-tagging plugin documentation. +- Now invalid tags can be return using the `key` filter. +- Added info-view for the plugin. + +Changed + +- The Technical information for the tag now is returned in a meta field. + +## [0.3.0] - 2020-07-08 + +### Added + +- Added validations only for DateTime fields. +- Added custom permissions to access the tag API. + +Changed + +- Changed Date fields like expiration date and activation date to DateTime fields. +- Changed STATUS from valid/invalid to active/inactive. + +## [0.2.0] - 2020-06-26 + +- REST API to create, get, filter and delete tags. +- New filters in Tag queryset. + +- First PyPI release. + +## [0.1.0] - 2020-06-23 + +### Added + +- First Github Release. diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index cb097d7..0000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,199 +0,0 @@ -Change Log -========== - -.. - All enhancements and patches to eox-tagging will be documented - in this file. It adheres to the structure of http://keepachangelog.com/ , - but in reStructuredText instead of Markdown (for ease of incorporation into - Sphinx documentation and the PyPI description). - - This project adheres to Semantic Versioning (http://semver.org/). -.. There should always be an "Unreleased" section for changes pending release. - -Unreleased ----------- -* Added tutor installation instructions in README file. - -[3.0.0] - 2021-11-17 --------------------- - -* **BREAKING CHANGE**: change backends defaults from Juniper to Lilac. - -[2.3.0] - 2021-10-11 --------------------- - -Added -~~~~~ -* Support for tagging Certificate objects. - -[2.2.0] - 2021-05-13 --------------------- - -Added -~~~~~ -* Lilac compatibility. - -Fix -~~~ -* Removed headers in audited destroy method. - -[2.1.0] - 2021-04-29 --------------------- - -Fix -~~~ -* Removed headers in audited method. - -[2.0.1] - 2021-02-11 --------------------- - -Fix -~~~ -* Fix eox-audit-model dependency in the settings - -[2.0.0] - 2021-02-10 --------------------- - -Added ------ -* Swagger support alongside REST API documentation - -[1.2.0] - 2021-02-03 --------------------- - -Added -_______ - -* Added expiration_date, tag_value and tag_type filters. - -Changed -_______ - -* Fixed courseenrollments filters and refactor the rest. -* Removed `required` from access field in serializer. - - -[1.1.0] - 2020-12-16 --------------------- - -Added -_______ - -* Permissions compatibility with DOT. - - -[1.0.0] - 2020-11-13 --------------------- - -Added -_______ - -* Migration compatibility with PY35. - - -[0.10.1] - 2020-11-12 --------------------- - -Changed -_______ - -* Fixed not loading correct settings when testing. - -[0.10.0] - 2020-10-13 --------------------- - -Added -_______ - -* Added support for filters in django2.2 - -[0.9.0] - 2020-10-05 --------------------- - -Added -_______ - -* Added support for Django 2.2. - -[0.8.0] - 2020-09-30 --------------------- - -Added -_______ - -* Adding bearer_authentication to support django-oauth2-provider and django-oauth-toolkit - -[0.7.0] - 2020-08-05 --------------------- - -Changed -_______ - -* Fixed case sensitive issue in the tag serializer with the fields `target_type` and `owner_type`. - -[0.6.0] - 2020-08-03 --------------------- - -Added -_____ - -* The user can force a value in a field using the configuration. - -Changed -_______ - -* Fixed datetime filters for activation_date and creation_date. - -[0.5.0] - 2020-07-14 --------------------- - -Changed -_______ - -* Using - instead of _ for the urls namespace. - -[0.4.0] - 2020-07-14 --------------------- - -Added -_____ - -* Added eox-tagging plugin documentation. -* Now invalid tags can be return using the `key` filter. -* Added info-view for the plugin. - -Changed -_______ - -* The Technical information for the tag now is returned in a meta field. - -[0.3.0] - 2020-07-08 --------------------- - -Added -_____ - -* Added validations only for DateTime fields. -* Added custom permissions to access the tag API. - -Changed -_______ - -* Changed Date fields like expiration date and activation date to DateTime fields. -* Changed STATUS from valid/invalid to active/inactive. - -[0.2.0] - 2020-06-26 ---------------------- - -* REST API to create, get, filter and delete tags. -* New filters in Tag queryset. - -* First PyPI release. - -[0.1.0] - 2020-06-23 ---------------------- - -Added -~~~~~ - -* First Github Release. diff --git a/setup.cfg b/setup.cfg index 47e61c7..f49f16a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [bumpversion] current_version = 4.0.0 -commit = True -tag = True +commit = False +tag = False [bumpversion:file:eox_tagging/__init__.py]