mirror of
https://github.com/darksaid98/auto-changelog.git
synced 2026-12-02 22:16:06 +00:00
refactor: improve imports (#217)
* refactor: improve imports Signed-off-by: Ardalan Amini <[email protected]> * ci: fix release workflow Signed-off-by: Ardalan Amini <[email protected]> * 📝 Add docstrings to `refactor/improve-imports` (#218) * 📝 Add docstrings to `refactor/improve-imports` Docstrings generation was requested by @ardalanamini. * https://github.com/ardalanamini/auto-changelog/pull/217#issuecomment-2953761296 The following files were modified: * `src/changelog.ts` * `src/footer.ts` * `src/generate.ts` * `src/inputs/commit-types.ts` * `src/inputs/default-commit-type.ts` * `src/inputs/github-token.ts` * `src/inputs/include-commit-links.ts` * `src/inputs/include-compare-link.ts` * `src/inputs/include-pr-links.ts` * `src/inputs/mention-authors.ts` * `src/inputs/mention-new-contributors.ts` * `src/inputs/release-name-prefix.ts` * `src/inputs/release-name.ts` * `src/inputs/semver.ts` * `src/inputs/use-github-autolink.ts` * `src/outputs/set-changelog.ts` * `src/outputs/set-prerelease.ts` * `src/outputs/set-release-id.ts` * `src/utils/octokit.ts` * Update changelog.ts Signed-off-by: Ardalan Amini <[email protected]> * style: address linter errors Signed-off-by: Ardalan Amini <[email protected]> --------- Signed-off-by: Ardalan Amini <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Ardalan Amini <[email protected]> --------- Signed-off-by: Ardalan Amini <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
99fcfc116e
commit
f54a10a737
66 files changed
+238
-121
No files matched your search
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { getBooleanInput } from "@actions/core";
|
||||
import { booleanInput, cache } from "../../src/utils";
|
||||
import { booleanInput, cache } from "#utils";
|
||||
|
||||
it("should get and parse a boolean input", () => {
|
||||
const inputName = "foo";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import { cache, clearCache } from "../../src/utils";
|
||||
import { cache, clearCache } from "#utils";
|
||||
|
||||
it("should cache value", () => {
|
||||
const name = "foo";
|
||||
|
||||
@@ -26,7 +26,7 @@ import { getInput } from "@actions/core";
|
||||
import { getOctokit } from "@actions/github";
|
||||
import { GitHub } from "@actions/github/lib/utils";
|
||||
import fetchMock from "fetch-mock";
|
||||
import { iterateCommits } from "../../src/utils";
|
||||
import { iterateCommits } from "#utils";
|
||||
|
||||
it("should iterate over commits", async () => {
|
||||
const repo = {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { getInput } from "@actions/core";
|
||||
import { cache, input } from "../../src/utils";
|
||||
import { cache, input } from "#utils";
|
||||
|
||||
it("should get input value", () => {
|
||||
const name = "foo";
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
import { getInput } from "@actions/core";
|
||||
import { getOctokit } from "@actions/github";
|
||||
import { GitHub } from "@actions/github/lib/utils";
|
||||
import { octokit } from "../../src/utils";
|
||||
import { octokit } from "#utils";
|
||||
|
||||
it("should get octokit instance", () => {
|
||||
const gitHubTokenInputName = "github-token";
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { info, setOutput } from "@actions/core";
|
||||
import { output } from "../../src/utils";
|
||||
import { output } from "#utils";
|
||||
|
||||
it("should output value", () => {
|
||||
const name = "foo";
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/* eslint-disable no-undefined */
|
||||
import { parseCommitMessage } from "../../src/utils";
|
||||
import { parseCommitMessage } from "#utils";
|
||||
|
||||
describe("acceptable commit message formats", () => {
|
||||
it("should parse the commit message with breaking false", () => {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { getInput } from "@actions/core";
|
||||
import { parseSemanticVersion } from "../../src/utils";
|
||||
import { parseSemanticVersion } from "#utils";
|
||||
|
||||
it("should parse the semver version string", () => {
|
||||
const major = 1;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { context } from "@actions/github";
|
||||
import { repository } from "../../src/utils";
|
||||
import { repository } from "#utils";
|
||||
|
||||
it("should get the repository information with constructed URL", () => {
|
||||
const repo = {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { context } from "@actions/github";
|
||||
import { sha } from "../../src/utils";
|
||||
import { sha } from "#utils";
|
||||
|
||||
it("should get the current commit sha", () => {
|
||||
const shaValue = "3c1177539c1a216084f922ea52e56dd719a25945";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import { trim } from "../../src/utils/trim.js";
|
||||
import { trim } from "#utils";
|
||||
|
||||
it("should remove leading and trailing whitespace", () => {
|
||||
expect(trim(" hello ")).toBe("hello");
|
||||
|
||||
Reference in new issue
Block a user