diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d05ff8cd077..dbfed2617ac 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,7 +13,7 @@ Remove this section if not relevant **[NOTICE] Bug fixes or features added to Salt require tests.** - [ ] Docs -- [ ] Changelog - https://docs.saltstack.com/en/latest/topics/development/changelog.html +- [ ] Changelog - [ ] Tests written/updated ### Commits signed with GPG? diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 22e31a5d96f..db86537ce09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,15 +67,6 @@ repos: - --py-version=3.5 - --platform=linux - - id: pip-tools-compile - alias: compile-changelog-requirements - name: Changelog Py3.5 Requirements - files: ^requirements/static/changelog\.in$ - args: - - -v - - --py-version=3.5 - - --platform=linux - - id: pip-tools-compile alias: compile-linux-crypto-py3.5-requirements name: Linux Py3.5 Crypto Requirements @@ -175,15 +166,6 @@ repos: - --py-version=3.6 - --platform=linux - - id: pip-tools-compile - alias: compile-changelog-requirements - name: Changelog Py3.6 Requirements - files: ^requirements/static/changelog\.in$ - args: - - -v - - --py-version=3.6 - - --platform=linux - - id: pip-tools-compile alias: compile-linux-crypto-py3.6-requirements name: Linux Py3.6 Crypto Requirements @@ -283,15 +265,6 @@ repos: - --py-version=3.7 - --platform=linux - - id: pip-tools-compile - alias: compile-changelog-requirements - name: Changelog Py3.7 Requirements - files: ^requirements/static/changelog\.in$ - args: - - -v - - --py-version=3.7 - - --platform=linux - - id: pip-tools-compile alias: compile-linux-crypto-py3.7-requirements name: Linux Py3.7 Crypto Requirements diff --git a/CHANGELOG.md b/CHANGELOG.md index 42b7ab0eb44..9328dd55389 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +# Changelog All notable changes to Salt will be documented in this file. This changelog follows [keepachangelog](https://keepachangelog.com/en/1.0.0/) format, and is intended for human consumption. diff --git a/changelog/55836.added b/changelog/55836.added deleted file mode 100644 index 5bec52a40aa..00000000000 --- a/changelog/55836.added +++ /dev/null @@ -1 +0,0 @@ -Add towncrier tool to the Salt project to help manage CHANGELOG.md file. diff --git a/doc/topics/development/changelog.rst b/doc/topics/development/changelog.rst deleted file mode 100644 index c47deaa956a..00000000000 --- a/doc/topics/development/changelog.rst +++ /dev/null @@ -1,87 +0,0 @@ -.. _changelog: - -========= -Changelog -========= - -With the addition of `SEP 01`_ the `keepachangelog`_ format was introduced into -our CHANGELOG.md file. The Salt project is using the `towncrier`_ tool to manage -the Changelog.md file. The reason this tool was added to manage the changelog -was because we were previously managing the file manually and it would cause -many merge conflicts. This tool allows us to add changelog entries into separate -files and before a release we simply need to run ``towncrier --version=`` -for it to compile the changelog correctly. - - -.. _add-changelog: - -How do I add a changelog entry ------------------------------- - -To add a changelog entry you will need to add a file in the `changelog` directory. -The file name should follow the syntax ``.``. - -The types are in alignment with keepachangelog: - - removed: - any features that have been removed - - deprecated: - any features that will soon be removed - - changed: - any changes in current existing features - - fixed: - any bug fixes - - added: - any new features added - -For example if you are fixing a bug for issue number #1234 your filename would -look like this: changelog/1234.fixed. The contents of the file should contain -a summary of what you are fixing. - -This does require that an issue be linked to all of the types above. - -.. _generate-changelog: - -How to generate the changelog ------------------------------ - -This step is only used when we need to generate the changelog right before releasing. -You should NOT run towncrier on your PR, unless you are preparing the final PR -to update the changelog before a release. - -You can run the `towncrier` tool directly or you can use nox to help run the command -and ensure towncrier is installed in a virtual environment. The instructions below -will detail both approaches. - -If you want to see what output towncrier will produce before generating the change log -you can run towncrier in draft mode: - -.. code-block:: bash - - towncrier --draft --version=3001 - -.. code-block:: bash - - nox -e 'changelog(draft=True)' -- 3000.1 - -Version will need to be set to whichever version we are about to release. Once you are -confident the draft output looks correct you can now generate the changelog by running: - -.. code-block:: bash - - towncrier --version=3001 - -.. code-block:: bash - - nox -e 'changelog(draft=False)' -- 3000.1 - -After this is run towncrier will automatically remove all the files in the changelog directory. - - -.. _`SEP 01`: https://github.com/saltstack/salt-enhancement-proposals/pull/2 -.. _`keepachangelog`: https://keepachangelog.com/en/1.0.0/ -.. _`towncrier`: https://pypi.org/project/towncrier/ diff --git a/noxfile.py b/noxfile.py index 253eb2ca24a..bdcc403c609 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1129,24 +1129,3 @@ def docs_man(session, compress, update): if compress: session.run("tar", "-cJvf", "man-archive.tar.xz", "_build/man", external=True) os.chdir("..") - - -@nox.session(name="changelog", python="3") -@nox.parametrize("draft", [False, True]) -def changelog(session, draft): - """ - Generate salt's changelog - """ - requirements_file = "requirements/static/changelog.in" - distro_constraints = [ - "requirements/static/{}/changelog.txt".format(_get_pydir(session)) - ] - install_command = ["--progress-bar=off", "-r", requirements_file] - for distro_constraint in distro_constraints: - install_command.extend(["--constraint", distro_constraint]) - session.install(*install_command, silent=PIP_INSTALL_SILENT) - - town_cmd = ["towncrier", "--version={}".format(session.posargs[0])] - if draft: - town_cmd.append("--draft") - session.run(*town_cmd) diff --git a/pyproject.toml b/pyproject.toml index 9969e02d0e9..afc8a6fae3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,34 +16,3 @@ line_length = 88 ensure_newline_before_comments=true skip="salt/ext,tests/kitchen,templates" -[tool.towncrier] - package = "salt" - package_dir = "salt" - filename = "CHANGELOG.md" - directory = "changelog/" - start_string = "# Changelog\n" - - [[tool.towncrier.type]] - directory = "removed" - name = "Removed" - showcontent = true - - [[tool.towncrier.type]] - directory = "deprecated" - name = "Deprecated" - showcontent = true - - [[tool.towncrier.type]] - directory = "changed" - name = "Changed" - showcontent = true - - [[tool.towncrier.type]] - directory = "fixed" - name = "Fixed" - showcontent = true - - [[tool.towncrier.type]] - directory = "added" - name = "Added" - showcontent = true diff --git a/requirements/static/changelog.in b/requirements/static/changelog.in deleted file mode 100644 index 0d2d2d7db84..00000000000 --- a/requirements/static/changelog.in +++ /dev/null @@ -1 +0,0 @@ -towncrier diff --git a/requirements/static/py3.5/changelog.txt b/requirements/static/py3.5/changelog.txt deleted file mode 100644 index ecef1b39a0e..00000000000 --- a/requirements/static/py3.5/changelog.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile -o requirements/static/py3.5/changelog.txt -v requirements/static/changelog.in -# -click==7.1.1 # via towncrier -incremental==17.5.0 # via towncrier -jinja2==2.11.2 # via towncrier -markupsafe==1.1.1 # via jinja2 -toml==0.10.0 # via towncrier -towncrier==19.2.0 diff --git a/requirements/static/py3.6/changelog.txt b/requirements/static/py3.6/changelog.txt deleted file mode 100644 index dd0c469a336..00000000000 --- a/requirements/static/py3.6/changelog.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile -o requirements/static/py3.6/changelog.txt -v requirements/static/changelog.in -# -click==7.1.1 # via towncrier -incremental==17.5.0 # via towncrier -jinja2==2.11.2 # via towncrier -markupsafe==1.1.1 # via jinja2 -toml==0.10.0 # via towncrier -towncrier==19.2.0 diff --git a/requirements/static/py3.7/changelog.txt b/requirements/static/py3.7/changelog.txt deleted file mode 100644 index b6a06719840..00000000000 --- a/requirements/static/py3.7/changelog.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# This file is autogenerated by pip-compile -# To update, run: -# -# pip-compile -o requirements/static/py3.7/changelog.txt -v requirements/static/changelog.in -# -click==7.1.1 # via towncrier -incremental==17.5.0 # via towncrier -jinja2==2.11.2 # via towncrier -markupsafe==1.1.1 # via jinja2 -toml==0.10.0 # via towncrier -towncrier==19.2.0