mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-03 22:15:31 +00:00
refactor: improve changelog logic (#197)
* refactor: improve changelog logic Signed-off-by: Ardalan Amini <[email protected]> * chore: update license comment formatting across all files Replaced `/*` with `/**` for correct JSDoc-style license comments in all files. This ensures consistency and compatibility with documentation tools that rely on JSDoc conventions. Signed-off-by: Ardalan Amini <[email protected]> * test: add unit tests for inputs Signed-off-by: Ardalan Amini <[email protected]> * test: add unit tests for utils Signed-off-by: Ardalan Amini <[email protected]> * test: add unit tests for outputs Signed-off-by: Ardalan Amini <[email protected]> * test: add unit tests for nodes Signed-off-by: Ardalan Amini <[email protected]> * test: add missing unit tests Signed-off-by: Ardalan Amini <[email protected]> * chore: address PR comments Signed-off-by: Ardalan Amini <[email protected]> * chore: address PR comments Signed-off-by: Ardalan Amini <[email protected]> --------- Signed-off-by: Ardalan Amini <[email protected]>
This commit is contained in:
1 parent
3c1177539c
commit
9bd6b8698c
95 files changed
+4381
-302
No files matched your search
+5
-8
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/**
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2020-2025 Ardalan Amini
|
||||
@@ -20,19 +20,17 @@
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
import { marked } from "marked";
|
||||
import {
|
||||
includeCompareLink,
|
||||
mentionNewContributors,
|
||||
octokit,
|
||||
releaseName,
|
||||
releaseNamePrefix,
|
||||
repository,
|
||||
useGithubAutolink,
|
||||
} from "./utils/index.js";
|
||||
useGitHubAutolink,
|
||||
} from "./inputs/index.js";
|
||||
import { octokit, repository } from "./utils/index.js";
|
||||
|
||||
export async function generateFooter(previousTagName?: string): Promise<string> {
|
||||
const { owner, repo, url } = repository();
|
||||
@@ -40,7 +38,6 @@ export async function generateFooter(previousTagName?: string): Promise<string>
|
||||
|
||||
const footer: string[] = [];
|
||||
|
||||
|
||||
if (mentionNewContributors()) {
|
||||
const { rest } = octokit();
|
||||
|
||||
@@ -64,7 +61,7 @@ export async function generateFooter(previousTagName?: string): Promise<string>
|
||||
if (includeCompareLink() && previousTagName) {
|
||||
let link = `${ url }/compare/${ previousTagName }...${ tagName }`;
|
||||
|
||||
if (!useGithubAutolink() || releaseNamePrefix()) link = `\`[${ previousTagName }...${ tagName }](${ url }/compare/${ previousTagName }...${ tagName })\``;
|
||||
if (!useGitHubAutolink() || releaseNamePrefix()) link = `\`[${ previousTagName }...${ tagName }](${ url }/compare/${ previousTagName }...${ tagName })\``;
|
||||
|
||||
footer.push(`**Full Changelog**: ${ link }`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user