From c9b2afe5fadf4a609a3d0ecdab06fa054f079261 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:19:17 +0900 Subject: [PATCH 1/4] chore(deps): Bump pre-commit hook (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/crate-ci/typos: v1.22.0 โ†’ v1.22.7](https://github.com/crate-ci/typos/compare/v1.22.0...v1.22.7) - [github.com/gitleaks/gitleaks: v8.18.3 โ†’ v8.18.4](https://github.com/gitleaks/gitleaks/compare/v8.18.3...v8.18.4) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75dd150..34b98b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,12 +23,12 @@ repos: args: [--whitespaces-count, "2"] - repo: https://github.com/crate-ci/typos - rev: v1.22.0 + rev: v1.22.7 hooks: - id: typos - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.3 + rev: v8.18.4 hooks: - id: gitleaks From 0c122c0ced65050c6e792be54ba32e418a831379 Mon Sep 17 00:00:00 2001 From: Souma <101255979+5ouma@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:44:14 +0900 Subject: [PATCH 2/4] ci(dependabot): Make PR to dev branch by Dependabot (#86) Since Dependabot opens to the default branch. --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1230149..e7a163a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,4 @@ updates: directory: "/" schedule: interval: "daily" + target-branch: "dev" From c4bb64c2869c299e56123f7e9d223a3c66a5cf3f Mon Sep 17 00:00:00 2001 From: Souma <101255979+5ouma@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:50:35 +0900 Subject: [PATCH 3/4] refactor(import-map): Use local import map (#87) For readability and writability. --- deno.json | 2 ++ src/libs/convert.ts | 7 ++++++- src/libs/io.ts | 2 +- src/libs/sites.ts | 2 +- src/main.ts | 4 ++-- src/types/feed.ts | 2 ++ test/libs/convert_test.ts | 2 +- test/libs/io_test.ts | 4 ++-- test/libs/sites_test.ts | 2 +- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/deno.json b/deno.json index 6a6f354..a0e958c 100644 --- a/deno.json +++ b/deno.json @@ -8,6 +8,8 @@ "cov": "deno task test --coverage && deno coverage --lcov > coverage.lcov" }, "imports": { + "@5ouma/opml-generator/libs": "./src/libs/mod.ts", + "@5ouma/opml-generator/types": "./src/types/mod.ts", "@libs/xml": "jsr:@libs/xml@5.4.7", "@std/assert": "jsr:@std/assert@0.226.0", "@std/cli": "jsr:@std/cli@0.224.6", diff --git a/src/libs/convert.ts b/src/libs/convert.ts index 485cac1..3fba2d0 100644 --- a/src/libs/convert.ts +++ b/src/libs/convert.ts @@ -1,7 +1,12 @@ import { stringify } from "@libs/xml"; import { parse } from "@std/toml"; import { transcodeXmlUrl } from "./sites.ts"; -import type { Feed, List, Lists, OPMLOutline } from "../types/mod.ts"; +import type { + Feed, + List, + Lists, + OPMLOutline, +} from "@5ouma/opml-generator/types"; export function convertFromTOML(data: string): Lists { const lists: Lists = parse(data) as Lists; diff --git a/src/libs/io.ts b/src/libs/io.ts index 4a6edc7..741ba34 100644 --- a/src/libs/io.ts +++ b/src/libs/io.ts @@ -1,7 +1,7 @@ import { paramCase } from "@wok/case"; import { format } from "@std/path"; import { convertFromTOML, convertToOPML } from "./convert.ts"; -import type { List, Lists } from "../types/mod.ts"; +import type { List, Lists } from "@5ouma/opml-generator/types"; export async function readTOML(file: string): Promise { try { diff --git a/src/libs/sites.ts b/src/libs/sites.ts index abfeed3..b64b5cf 100644 --- a/src/libs/sites.ts +++ b/src/libs/sites.ts @@ -1,4 +1,4 @@ -import type { site } from "../types/mod.ts"; +import type { site } from "@5ouma/opml-generator/types"; const sites: site[] = [ { type: "bluesky", url: new URL("https://bsky.app/profile/{id}/rss") }, diff --git a/src/main.ts b/src/main.ts index 45924e2..705e127 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import { parseArgs } from "@std/cli"; import { basename, resolve } from "@std/path"; -import { readTOML, writeXML } from "./libs/mod.ts"; -import type { Lists } from "./types/mod.ts"; +import { readTOML, writeXML } from "@5ouma/opml-generator/libs"; +import type { Lists } from "@5ouma/opml-generator/types"; const flags = parseArgs(Deno.args, { string: ["feeds", "output"], diff --git a/src/types/feed.ts b/src/types/feed.ts index d185870..d588be4 100644 --- a/src/types/feed.ts +++ b/src/types/feed.ts @@ -1,10 +1,12 @@ export type Lists = { lists: List[]; }; + export type List = { name: string; feeds: Feed[]; }; + export type Feed = { title: string; type?: string; diff --git a/test/libs/convert_test.ts b/test/libs/convert_test.ts index 46b6d29..4682ebc 100644 --- a/test/libs/convert_test.ts +++ b/test/libs/convert_test.ts @@ -1,6 +1,6 @@ import { assertEquals } from "@std/assert"; import { convertFromTOML, convertToOPML } from "../../src/libs/convert.ts"; -import type { List, Lists } from "../../src/types/mod.ts"; +import type { List, Lists } from "@5ouma/opml-generator/types"; Deno.test("Parse TOML", async (t: Deno.TestContext) => { await t.step("rss", () => { diff --git a/test/libs/io_test.ts b/test/libs/io_test.ts index adee569..4f0527d 100644 --- a/test/libs/io_test.ts +++ b/test/libs/io_test.ts @@ -1,8 +1,8 @@ import { assertEquals, assertIsError } from "@std/assert"; import { join } from "@std/path"; -import { readTOML, writeXML } from "../../src/libs/io.ts"; +import { readTOML, writeXML } from "@5ouma/opml-generator/libs"; import { convertFromTOML, convertToOPML } from "../../src/libs/convert.ts"; -import type { Lists } from "../../src/types/mod.ts"; +import type { Lists } from "@5ouma/opml-generator/types"; Deno.test("Read TOML", async (t: Deno.TestContext) => { await t.step("normal", async () => { diff --git a/test/libs/sites_test.ts b/test/libs/sites_test.ts index fda4a18..ae0a8cc 100644 --- a/test/libs/sites_test.ts +++ b/test/libs/sites_test.ts @@ -1,6 +1,6 @@ import { assertEquals } from "@std/assert"; import { transcodeXmlUrl } from "../../src/libs/sites.ts"; -import type { Feed } from "../../src/types/mod.ts"; +import type { Feed } from "@5ouma/opml-generator/types"; Deno.test("Get XML URL", async (t: Deno.TestContext) => { await t.step("site", () => { From 1020c424bdcff0fe6a07ce92f3da14cdd2504821 Mon Sep 17 00:00:00 2001 From: Souma <101255979+5ouma@users.noreply.github.com> Date: Thu, 20 Jun 2024 17:02:23 +0900 Subject: [PATCH 4/4] style(label): Improve GitHub Label related (#88) Make labels more good, and the development experience better. --- .github/ISSUE_TEMPLATE/1-feature-request.yml | 2 +- .github/ISSUE_TEMPLATE/2-bug-report.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 3 +- .github/dependabot.yml | 1 + .github/pr-labeler.yml | 28 ++++++----- .github/release.yml | 49 ++++++++++---------- .github/workflows/deps-update.yml | 1 - 7 files changed, 46 insertions(+), 40 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-feature-request.yml b/.github/ISSUE_TEMPLATE/1-feature-request.yml index 2799826..b2d466c 100644 --- a/.github/ISSUE_TEMPLATE/1-feature-request.yml +++ b/.github/ISSUE_TEMPLATE/1-feature-request.yml @@ -1,6 +1,6 @@ name: ๐ŸŽ‰ Feature Request description: Request a new feature or enhancement to an existing feature -labels: ["Type: Feature"] +labels: ["๐ŸŽ‰ New Feature"] body: - type: textarea id: feature-description diff --git a/.github/ISSUE_TEMPLATE/2-bug-report.yml b/.github/ISSUE_TEMPLATE/2-bug-report.yml index f3b16e5..98e2027 100644 --- a/.github/ISSUE_TEMPLATE/2-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/2-bug-report.yml @@ -1,6 +1,6 @@ name: ๐Ÿงฐ Bug Report description: Something doesn't work -labels: ["Type: Bug"] +labels: ["๐Ÿงฐ Bug"] body: - type: textarea id: bug-description diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index de9609c..edfdecf 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -8,10 +8,11 @@ close # ### ๐Ÿ”„ Type of the Change -- [ ] ๐ŸŽ‰ Feature +- [ ] ๐ŸŽ‰ New Feature - [ ] ๐Ÿงฐ Bug - [ ] ๐Ÿ›ก๏ธ Security - [ ] ๐Ÿ“– Documentation +- [ ] ๐ŸŽ๏ธ Performance - [ ] ๐Ÿงน Refactoring - [ ] ๐Ÿงช Testing - [ ] ๐Ÿ”ง Maintenance diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e7a163a..c9cd0ff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,4 @@ updates: schedule: interval: "daily" target-branch: "dev" + labels: [] diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml index afbf925..61a569c 100644 --- a/.github/pr-labeler.yml +++ b/.github/pr-labeler.yml @@ -3,25 +3,29 @@ searchTitle: true searchBody: true customLabels: - - text: "- [x] ๐ŸŽ‰ Feature" - label: "Type: Feature" + - text: "- [x] ๐ŸŽ‰ New Feature" + label: "๐ŸŽ‰ New Feature" - text: "- [x] ๐Ÿงฐ Bug" - label: "Type: Bug" + label: "๐Ÿงฐ Bug" - text: "- [x] ๐Ÿ›ก๏ธ Security" - label: "Type: Security" + label: "๐Ÿ›ก๏ธ Security" - text: "- [x] ๐Ÿ“– Documentation" - label: "Type: Documentation" + label: "๐Ÿ“– Documentation" + - text: "- [x] ๐ŸŽ๏ธ Performance" + label: "๐ŸŽ๏ธ Performance" - text: "- [x] ๐Ÿงน Refactoring" - label: "Type: Refactoring" + label: "๐Ÿงน Refactoring" - text: "- [x] ๐Ÿงช Testing" - label: "Type: Testing" + label: "๐Ÿงช Testing" - text: "- [x] ๐Ÿ”ง Maintenance" - label: "Type: Maintenance" + label: "๐Ÿ”ง Maintenance" - text: "- [x] ๐ŸŽฝ CI" - label: "Type: CI" + label: "๐ŸŽฝ CI" - text: "- [x] โ›“๏ธ Dependencies" - label: "Type: Dependencies" + label: "โ›“๏ธ Dependencies" - text: "chore(deps): " - label: "Type: Dependencies" + label: "โ›“๏ธ Dependencies" - text: "- [x] ๐Ÿง  Meta" - label: "Type: Meta" + label: "๐Ÿง  Meta" + - text: "Release v" + label: "๐Ÿš€ Release" diff --git a/.github/release.yml b/.github/release.yml index fc7e406..e6906ad 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,30 +1,31 @@ changelog: exclude: labels: - - "Type: Meta" - - "Type: Question" - - "Type: Release" + - "๐Ÿง  Meta" + - "๐Ÿš€ Release" categories: - - title: ๐Ÿงจ Breaking Changes - labels: ["Type: Breaking Change"] - - title: ๐ŸŽ‰ New Features - labels: ["Type: Feature"] - - title: ๐Ÿงฐ Bug Fixes - labels: ["Type: Bug"] - - title: ๐Ÿ›ก๏ธ Security Fixes - labels: ["Type: Security"] - - title: ๐Ÿ“– Documentation Changes - labels: ["Type: Documentation"] - - title: ๐Ÿงน Refactoring - labels: ["Type: Refactoring"] - - title: ๐Ÿงช Testing - labels: ["Type: Testing"] - - title: ๐Ÿ”ง Maintenance - labels: ["Type: Maintenance"] - - title: ๐ŸŽฝ CI - labels: ["Type: CI"] - - title: โ›“๏ธ Dependency Updates - labels: ["Type: Dependencies", "dependencies"] - - title: ๐Ÿ” Other Changes + - title: "๐Ÿงจ Breaking Changes" + labels: ["๐Ÿงจ Breaking Change"] + - title: "๐ŸŽ‰ New Features" + labels: ["๐ŸŽ‰ New Feature"] + - title: "๐Ÿงฐ Bug Fixes" + labels: ["๐Ÿงฐ Bug"] + - title: "๐Ÿ›ก๏ธ Security Fixes" + labels: ["๐Ÿ›ก๏ธ Security"] + - title: "๐Ÿ“– Documentation Changes" + labels: ["๐Ÿ“– Documentation"] + - title: "๐ŸŽ๏ธ Performance Improvements" + labels: ["๐ŸŽ๏ธ Performance"] + - title: "๐Ÿงน Refactoring" + labels: ["๐Ÿงน Refactoring"] + - title: "๐Ÿงช Testing" + labels: ["๐Ÿงช Testing"] + - title: "๐Ÿ”ง Maintenance" + labels: ["๐Ÿ”ง Maintenance"] + - title: "๐ŸŽฝ CI" + labels: ["๐ŸŽฝ CI"] + - title: "โ›“๏ธ Dependency Updates" + labels: ["โ›“๏ธ Dependencies", "dependencies"] + - title: "๐Ÿ” Other Changes" labels: ["*"] diff --git a/.github/workflows/deps-update.yml b/.github/workflows/deps-update.yml index 1e492d0..b52f7b2 100644 --- a/.github/workflows/deps-update.yml +++ b/.github/workflows/deps-update.yml @@ -26,4 +26,3 @@ jobs: base: dev branch: deps-deno commit-prefix: "chore(deps):" - labels: "Type: Dependencies"