diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml
new file mode 100644
index 0000000000..d4cdf64f70
--- /dev/null
+++ b/.github/workflows/changelog-check.yml
@@ -0,0 +1,43 @@
+name: Check the description in CHANGELOG.md
+
+on:
+ pull_request:
+ branches:
+ - master
+ - develop
+
+jobs:
+ check-changelog:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout head
+ uses: actions/checkout@v4.1.1
+ - name: Setup Node.js
+ uses: actions/setup-node@v4.0.1
+ with:
+ node-version-file: '.node-version'
+
+ - name: Checkout base
+ run: |
+ mkdir _base
+ cp -r .git _base/.git
+ cd _base
+ git fetch --depth 1 origin ${{ github.base_ref }}
+ git checkout origin/${{ github.base_ref }} CHANGELOG.md
+
+ - name: Copy to Checker directory for CHANGELOG-base.md
+ run: cp _base/CHANGELOG.md scripts/changelog-checker/CHANGELOG-base.md
+ - name: Copy to Checker directory for CHANGELOG-head.md
+ run: cp CHANGELOG.md scripts/changelog-checker/CHANGELOG-head.md
+ - name: diff
+ continue-on-error: true
+ run: diff -u CHANGELOG-base.md CHANGELOG-head.md
+ working-directory: scripts/changelog-checker
+
+ - name: Setup Checker
+ run: npm install
+ working-directory: scripts/changelog-checker
+ - name: Run Checker
+ run: npm run run
+ working-directory: scripts/changelog-checker
diff --git a/.github/workflows/check-misskey-js-autogen.yml b/.github/workflows/check-misskey-js-autogen.yml
new file mode 100644
index 0000000000..0b34cdc202
--- /dev/null
+++ b/.github/workflows/check-misskey-js-autogen.yml
@@ -0,0 +1,127 @@
+name: Check Misskey JS autogen
+
+on:
+ pull_request:
+ branches:
+ - master
+ - develop
+ paths:
+ - packages/backend/**
+
+jobs:
+ check-misskey-js-autogen:
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+
+ env:
+ api_json_names: "api-base.json api-head.json"
+
+ steps:
+ - name: checkout
+ uses: actions/checkout@v4
+ with:
+ submodules: true
+
+ - name: setup pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 8
+
+ - name: setup node
+ id: setup-node
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: '.node-version'
+ cache: pnpm
+
+ - name: install dependencies
+ run: pnpm i --frozen-lockfile
+
+ - name: wait get-api-diff
+ uses: lewagon/wait-on-check-action@v1.3.3
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+ check-regexp: get-from-misskey .+
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ wait-interval: 30
+
+ - name: Download artifact
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const fs = require('fs');
+
+ const workflows = await github.rest.actions.listWorkflowRunsForRepo({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ head_sha: `${{ github.event.pull_request.head.sha }}`
+ }).then(x => x.data.workflow_runs);
+
+ console.log(workflows.map(x => ({name: x.name, title: x.display_title})));
+
+ const run_id = workflows.find(x => x.name.includes("Get api.json from Misskey")).id;
+
+ let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ run_id: run_id,
+ });
+
+ let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
+ return artifact.name.startsWith("api-artifact-") || artifact.name == "api-artifact"
+ });
+
+ await Promise.all(matchArtifacts.map(async (artifact) => {
+ let download = await github.rest.actions.downloadArtifact({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ artifact_id: artifact.id,
+ archive_format: 'zip',
+ });
+ await fs.promises.writeFile(`${process.env.GITHUB_WORKSPACE}/${artifact.name}.zip`, Buffer.from(download.data));
+ }));
+
+ - name: unzip artifacts
+ run: |-
+ find . -mindepth 1 -maxdepth 1 -type f -name '*.zip' -exec unzip {} -d . ';'
+ ls -la
+
+ - name: build autogen
+ run: |-
+ for name in $(echo $api_json_names)
+ do
+ checksum=$(mktemp)
+ mv $name packages/misskey-js/generator/api.json
+
+ cd packages/misskey-js/generator
+ pnpm run generate
+ find built -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
+ cd ../../..
+ cp $checksum ${name}_checksum
+ done
+
+ - name: check update for type definitions
+ run: diff $(echo -n ${api_json_names} | awk -v RS=" " '{ printf "%s_checksum ", $0 }')
+
+ - name: send message
+ if: failure()
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: check-misskey-js-autogen
+ message: |-
+ Thank you for sending us a great Pull Request! ð
+ Please regenerate misskey-js type definitions! ð
+
+ example:
+ ```sh
+ pnpm run build-misskey-js-with-types
+ ```
+
+ - name: send message
+ if: success()
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ comment_tag: check-misskey-js-autogen
+ mode: delete
+ message: "Thank you!"
diff --git a/.github/workflows/validate-api-json.yml b/.github/workflows/validate-api-json.yml
index bc5ba20cb9..93c4cf4cd1 100644
--- a/.github/workflows/validate-api-json.yml
+++ b/.github/workflows/validate-api-json.yml
@@ -33,8 +33,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- - name: Install swagger-cli
- run: npm i -g swagger-cli
+ - name: Install Redocly CLI
+ run: npm i -g @redocly/cli
- run: corepack enable
- run: pnpm i --frozen-lockfile
- name: Check pnpm-lock.yaml
@@ -44,4 +44,4 @@ jobs:
- name: Build and generate
run: pnpm build && pnpm --filter backend generate-api-json
- name: Validation
- run: swagger-cli validate ./packages/backend/built/api.json
+ run: npx @redocly/cli lint --extends=minimal ./packages/backend/built/api.json
diff --git a/.gitignore b/.gitignore
index d7b486b977..bdc14fea0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,6 +58,7 @@ api-docs.json
ormconfig.json
temp
/packages/frontend/src/**/*.stories.ts
+tsdoc-metadata.json
# blender backups
*.blend1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cdb27874e8..059aa1fa98 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,5 @@
- {{ flash.summary.length > 85 ? flash.summary.slice(0, 85) + 'âŠ' : flash.summary }}
+ {{ code }}
-
- {{ code }}
{{ i18n.t('empty-drive-description') }}
{{ i18n.ts['empty-drive-description'] }}{{ flash.title }}
- {{ i18n.t('_poll.totalVotes', { n: total }) }} + {{ i18n.tsx._poll.totalVotes({ n: total }) }} · {{ showResult ? i18n.ts._poll.vote : i18n.ts._poll.showResult }} {{ i18n.ts._poll.voted }} @@ -47,10 +47,11 @@ const remaining = ref(-1); const total = computed(() => sum(props.note.poll.choices.map(x => x.votes))); const closed = computed(() => remaining.value === 0); const isVoted = computed(() => !props.note.poll.multiple && props.note.poll.choices.some(c => c.isVoted)); -const timer = computed(() => i18n.t( - remaining.value >= 86400 ? '_poll.remainingDays' : - remaining.value >= 3600 ? '_poll.remainingHours' : - remaining.value >= 60 ? '_poll.remainingMinutes' : '_poll.remainingSeconds', { +const timer = computed(() => i18n.tsx._poll[ + remaining.value >= 86400 ? 'remainingDays' : + remaining.value >= 3600 ? 'remainingHours' : + remaining.value >= 60 ? 'remainingMinutes' : 'remainingSeconds' + ]({ s: Math.floor(remaining.value % 60), m: Math.floor(remaining.value / 60) % 60, h: Math.floor(remaining.value / 3600) % 24, @@ -81,7 +82,7 @@ const vote = async (id) => { const { canceled } = await os.confirm({ type: 'question', - text: i18n.t('voteConfirm', { choice: props.note.poll.choices[id].text }), + text: i18n.tsx.voteConfirm({ choice: props.note.poll.choices[id].text }), }); if (canceled) return; diff --git a/packages/frontend/src/components/MkPollEditor.vue b/packages/frontend/src/components/MkPollEditor.vue index 43e576d1ab..34f6c72b6e 100644 --- a/packages/frontend/src/components/MkPollEditor.vue +++ b/packages/frontend/src/components/MkPollEditor.vue @@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.t('_auth.permission', { name }) }}
+{{ i18n.tsx._auth.permission({ name }) }}
{{ i18n.ts._auth.callback }}
{{ i18n.t('_auth.permission', { name }) }} {{ i18n.tsx._auth.permission({ name }) }} {{ i18n.ts._auth.permissionAsk }} {{ i18n.t('_auth.permission', { name }) }} {{ i18n.tsx._auth.permission({ name }) }} {{ i18n.ts._auth.permissionAsk }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- {{ instance.name || `(${i18n.ts.unknown})` }}
-
+ {{ instance.name || `(${i18n.ts.unknown})` }}
-
-