200: fix(changelog): fix previous release references r=orhun a=tvcsantos
<!--- Thank you for contributing to git-cliff! ⛰️ -->
## Description
<!--- Describe your changes in detail -->
Currently the previous pointer is not available under the unreleased group when running `git cliff`. Also when running `git cliff --unreleased` the preivous release is not correct and is pointing to the release before last, instead of the last tagged release.
This PR deals with this by doing the following. For tackling the first problem we simply check if we produced more then one release at the end of the loop and add the missing pointers to the previous release.
For solving the other problem we just adapt the `checked_sub` argument to take the difference into account and fix it on the unreleased scenario, when it must be `1` instead of `2`.
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Currently the previous pointer is not available under the unreleased group when running `git cliff`. Also when running `git cliff --unreleased` the preivous release is not correct and is pointing to the release before last, instead of the last tagged release. This PR deals with these problems.
This is particularly useful for example on a Keep A Changelog format where we need the correct previous pointers so that we can add the proper link references.
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
I've added an extra fixture with a keep a changelog format example to test the scenario.
## Screenshots / Logs (if applicable)
## Types of Changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (no code change)
- [ ] Refactor (refactoring production code)
- [ ] Other <!--- (provide information) -->
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] I have updated the documentation accordingly.
- [x] I have formatted the code with [rustfmt](https://github.com/rust-lang/rustfmt).
- [x] I checked the lints with [clippy](https://github.com/rust-lang/rust-clippy).
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Co-authored-by: Tiago Santos <tvcsantos@gmail.com>
201: chore(deps): bump serde_json from 1.0.97 to 1.0.99 r=orhun a=dependabot[bot]
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.97 to 1.0.99.
202: chore(deps): bump toml from 0.7.4 to 0.7.5 r=orhun a=dependabot[bot]
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.4 to 0.7.5.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
199: chore(deps): bump clap from 4.3.5 to 4.3.8 r=orhun a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.5 to 4.3.8.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
198: chore(deps): bump indexmap from 1.9.3 to 2.0.0 r=orhun a=dependabot[bot]
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.9.3 to 2.0.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
197: chore(deps): bump clap from 4.3.4 to 4.3.5 r=orhun a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.4 to 4.3.5.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
196: chore(deps): bump serde_json from 1.0.96 to 1.0.97 r=orhun a=dependabot[bot]
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.96 to 1.0.97.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
192: chore(deps): bump log from 0.4.18 to 0.4.19 r=orhun a=dependabot[bot]
Bumps [log](https://github.com/rust-lang/log) from 0.4.18 to 0.4.19.
193: chore(deps): bump clap from 4.3.3 to 4.3.4 r=orhun a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.3 to 4.3.4.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
189: chore(deps): bump rust-embed from 6.6.1 to 6.7.0 r=orhun a=dependabot[bot]
Bumps [rust-embed](https://github.com/pyros2097/rust-embed) from 6.6.1 to 6.7.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
190: chore(deps): bump serde from 1.0.163 to 1.0.164 r=orhun a=dependabot[bot]
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164.
191: chore(deps): bump clap from 4.3.2 to 4.3.3 r=orhun a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.2 to 4.3.3.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
186: chore(deps): bump regex from 1.8.3 to 1.8.4 r=orhun a=dependabot[bot]
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.3 to 1.8.4.
187: chore(deps): bump clap from 4.3.1 to 4.3.2 r=orhun a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.1 to 4.3.2.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
182: chore(deps): bump tera from 1.18.1 to 1.19.0 r=orhun a=dependabot[bot]
Bumps [tera](https://github.com/Keats/tera) from 1.18.1 to 1.19.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
180: chore(deps): bump git2 from 0.17.1 to 0.17.2 r=orhun a=dependabot[bot]
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.17.1 to 0.17.2.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
181: chore(deps): bump log from 0.4.17 to 0.4.18 r=orhun a=dependabot[bot]
Bumps [log](https://github.com/rust-lang/log) from 0.4.17 to 0.4.18.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
179: chore(deps): bump regex from 1.8.2 to 1.8.3 r=orhun a=dependabot[bot]
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.2 to 1.8.3.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
178: chore(deps): bump regex from 1.8.1 to 1.8.2 r=orhun a=dependabot[bot]
Bumps [regex](https://github.com/rust-lang/regex) from 1.8.1 to 1.8.2.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
176: chore(deps): bump clap_mangen from 0.2.10 to 0.2.11 r=orhun a=dependabot[bot]
Bumps [clap_mangen](https://github.com/clap-rs/clap) from 0.2.10 to 0.2.11.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
177: chore(deps): bump clap_complete from 4.2.3 to 4.3.0 r=orhun a=dependabot[bot]
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.2.3 to 4.3.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
175: chore(deps): bump clap from 4.2.7 to 4.3.0 r=orhun a=dependabot[bot]
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.7 to 4.3.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
173: chore(deps): bump pretty_env_logger from 0.4.0 to 0.5.0 r=orhun a=dependabot[bot]
Bumps [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) from 0.4.0 to 0.5.0.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
174: chore(deps): bump toml from 0.7.3 to 0.7.4 r=orhun a=dependabot[bot]
Bumps [toml](https://github.com/toml-rs/toml) from 0.7.3 to 0.7.4.
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>