Skip to content

Commit

Permalink
Merge branch 'upstream' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Esurio committed May 26, 2024
2 parents e8a2dc6 + 8d87735 commit b14d587
Show file tree
Hide file tree
Showing 215 changed files with 6,495 additions and 3,185 deletions.
143 changes: 72 additions & 71 deletions .github/workflows/check-cherrypick-js-autogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,23 @@ on:
branches:
- master
- develop
- improve-cherrypick-js-autogen-check
paths:
- packages/backend/**

jobs:
check-cherrypick-js-autogen:
# pull_request_target safety: permissions: read-all, and there are no secrets used in this job
generate-cherrypick-js:
runs-on: ubuntu-latest
permissions:
pull-requests: write

env:
api_json_name: "api-head.json"

contents: read
if: ${{ github.event.pull_request.mergeable == null || github.event.pull_request.mergeable == true }}
steps:
- name: checkout
uses: actions/checkout@v4.1.1
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: setup pnpm
uses: pnpm/action-setup@v3
Expand All @@ -39,79 +38,81 @@ jobs:
- name: install dependencies
run: pnpm i --frozen-lockfile

- name: wait get-api-diff
uses: lewagon/wait-on-check-action@v1.3.3
# generate api.json
- name: Copy Config
run: cp .config/example.yml .config/default.yml
- name: Build
run: pnpm build
- name: Generate API JSON
run: pnpm --filter backend generate-api-json

# build cherrypick js
- name: Build cherrypick-js
run: |-
cp packages/backend/built/api.json packages/cherrypick-js/generator/api.json
pnpm run --filter cherrypick-js-type-generator generate
# packages/cherrypick-js/generator/built/autogen
- name: Upload Generated
uses: actions/upload-artifact@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
check-regexp: get-from-cherrypick .+
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 30
name: generated-cherrypick-js
path: packages/cherrypick-js/generator/built/autogen

- name: Download artifact
uses: actions/github-script@v7.0.1
# pull_request_target safety: permissions: read-all, and there are no secrets used in this job
get-actual-cherrypick-js:
runs-on: ubuntu-latest
permissions:
contents: read
if: ${{ github.event.pull_request.mergeable == null || github.event.pull_request.mergeable == true }}
steps:
- name: checkout
uses: actions/checkout@v4.1.1
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 CherryPick")).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
submodules: true
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: get head checksum
run: |-
checksum=$(realpath head_checksum)
- name: Upload From Merged
uses: actions/upload-artifact@v4
with:
name: actual-cherrypick-js
path: packages/cherrypick-js/src/autogen

cd packages/cherrypick-js/src
find autogen -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
cd ../../..
# pull_request_target safety: nothing is cloned from repository
comment-cherrypick-js-autogen:
runs-on: ubuntu-latest
needs: [generate-cherrypick-js, get-actual-cherrypick-js]
permissions:
pull-requests: write
steps:
- name: download generated-cherrypick-js
uses: actions/download-artifact@v4
with:
name: generated-cherrypick-js
path: cherrypick-js-generated

- name: build autogen
run: |-
checksum=$(realpath ${api_json_name}_checksum)
mv $api_json_name packages/cherrypick-js/generator/api.json
- name: download actual-cherrypick-js
uses: actions/download-artifact@v4
with:
name: actual-cherrypick-js
path: cherrypick-js-actual

- name: check cherrypick-js changes
id: check-changes
run: |
diff -r -u --label=generated --label=on-tree ./cherrypick-js-generated ./cherrypick-js-actual > cherrypick-js.diff || true
cd packages/cherrypick-js/generator
pnpm run generate
cd built
find autogen -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
cd ../../../..
if [ -s cherrypick-js.diff ]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: check update for type definitions
run: diff head_checksum ${api_json_name}_checksum
- name: Print full diff
run: cat ./cherrypick-js.diff

- name: send message
if: failure()
if: steps.check-changes.outputs.changes == 'true'
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: check-cherrypick-js-autogen
Expand All @@ -125,7 +126,7 @@ jobs:
```
- name: send message
if: success()
if: steps.check-changes.outputs.changes == 'false'
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: check-cherrypick-js-autogen
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/deploy-test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ jobs:
- name: Get PR ref
id: get-ref
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=$(jq --raw-output .issue.number $GITHUB_EVENT_PATH)
PR_REF=$(gh pr view $PR_NUMBER --json headRefName -q '.headRefName')
echo "pr-ref=$PR_REF" > $GITHUB_OUTPUT
PR_REF="refs/pull/${{ github.event.issue.number }}/head"
echo "pr-ref=$PR_REF" >> $GITHUB_OUTPUT
- name: Extract wait time
id: get-wait-time
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ jobs:
- run: pnpm i --frozen-lockfile
- run: pnpm --filter cherrypick-js run build
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter misskey-reversi run build:tsc
- run: pnpm --filter misskey-reversi run build
if: ${{ matrix.workspace == 'backend' }}
- run: pnpm --filter ${{ matrix.workspace }} run typecheck
7 changes: 4 additions & 3 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,13 @@ jobs:
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi
BRANCH="${{ github.event.pull_request.head.user.login }}:${{ github.event.pull_request.head.ref }}"
if [ "$BRANCH" = "kokonect-link:${{ github.event.pull_request.head.ref }}" ]; then
BRANCH="${{ github.event.pull_request.head.ref }}"
BRANCH="${{ github.event.pull_request.head.user.login }}:$HEAD_REF"
if [ "$BRANCH" = "kokonect-link:$HEAD_REF" ]; then
BRANCH="$HEAD_REF"
fi
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name $BRANCH $(echo "$CHROMATIC_PARAMETER")
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
- name: Notify that Chromatic detects changes
uses: actions/github-script@v7.0.1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
with:
version: 8
run_install: false
- name: Install FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.2
with:
Expand Down
65 changes: 62 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,70 @@
<!--
## 202x.x.x (unreleased)
## Unreleased

### Note
- コントロールパネル内にあるサマリープロキシの設定個所がセキュリティから全般へ変更となります。

### General
- Enhance: URLプレビューの有効化・無効化を設定できるように #13569
- Enhance: アンテナでBotによるノートを除外できるように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/545)
- Enhance: クリップのノート数を表示するように
- Fix: Play作成時に設定した公開範囲が機能していない問題を修正

### Client
- Feat: アップロードするファイルの名前をランダム文字列にできるように
- Enhance: 自分のノートの添付ファイルから直接ファイルの詳細ページに飛べるように
- Enhance: 広告がMisskeyと同一ドメインの場合はRouterで遷移するように
- Enhance: リアクション・いいねの総数を表示するように
- Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように
- Enhance: 設定>プラグインのページからプラグインの簡易的なログやエラーを見られるように
- 実装の都合により、プラグインは1つエラーを起こした時に即時停止するようになりました
- Enhance: ページのデザインを変更
- Enhance: 2要素認証(ワンタイムパスワード)の入力欄を改善
- Enhance: 「今日誕生日のフォロー中ユーザー」ウィジェットを手動でリロードできるように
- Enhance: 映像・音声の再生にブラウザのネイティブプレイヤーを使用できるように
- Enhance: 映像・音声の再生メニューに「再生速度」「ループ再生」「ピクチャインピクチャ」を追加
- Enhance: 映像・音声の再生にキーボードショートカットが使えるように
- Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように
- Enhance: リプライにて引用がある場合テキストが空でもノートできるように
- 引用したいノートのURLをコピーしリプライ投稿画面にペーストして添付することで達成できます
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される
- Fix: WebGL2をサポートしないブラウザで「季節に応じた画面の演出」が有効になっているとき、Misskeyが起動できなくなる問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/459)
- Fix: ページタイトルでローカルユーザーとリモートユーザーの区別がつかない問題を修正
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/528)
- Fix: コードブロックのシンタックスハイライトで使用される定義ファイルをCDNから取得するように #13177
- CDNから取得せずMisskey本体にバンドルする場合は`pacakges/frontend/vite.config.ts`を修正してください。
- Fix: タイムゾーンによっては、「今日誕生日のフォロー中ユーザー」ウィジェットが正しく動作しない問題を修正
- Fix: CWのみの引用リノートが詳細ページで純粋なリノートとして誤って扱われてしまう問題を修正
- Fix: ノート詳細ページにおいてCW付き引用リノートのCWボタンのラベルに「引用」が含まれていない問題を修正
- Fix: ダイアログの入力で字数制限に違反していてもEnterキーが押せてしまう問題を修正
- Fix: ダイレクト投稿の宛先が保存されない問題を修正

### Server
- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに
- Enhance: misskey-dev/summaly@5.1.0の取り込み(プレビュー生成処理の効率化)
- Fix: フォローリクエストを作成する際に既存のものは削除するように
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/440)
- Fix: エンドポイント`notes/translate`のエラーを改善
- Fix: CleanRemoteFilesProcessorService report progress from 100% (#13632)
- Fix: 一部の音声ファイルが映像ファイルとして扱われる問題を修正
- Fix: リプライのみの引用リノートと、CWのみの引用リノートが純粋なリノートとして誤って扱われてしまう問題を修正
- Fix: 登録にメール認証が必須になっている場合、登録されているメールアドレスを削除できないように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/606)
- Fix: nginx経由で/files/にRangeリクエストされた場合に正しく応答できないのを修正

## 2024.3.1

### General
-

### Client
-
- Fix: 絵文字関係の不具合を修正 (#13485)
- 履歴に残っている or ピン留めされた絵文字がコントロールパネルより削除されていた際にリアクションデッキが表示できなくなる
- Unicode絵文字が履歴に残っている or ピン留めされているとリアクションデッキが表示できなくなる
- Fix: カスタム絵文字の画像読み込みに失敗した際はテキストではなくダミー画像を表示 #13487

### Server
-
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,38 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE
# 릴리즈 노트
이 문서는 CherryPick의 변경 사항만 포함합니다.

## 4.8.0
출시일: 2024/5/20<br>
기반 Misskey 버전: 2024.3.1<br>
Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#202431](CHANGELOG.md#202431) 문서를 참고하십시오.

### General
- Change: '타임라인에 다른 사람에게 보내는 답글을 포함'의 기본값을 비활성으로 설정

### Client
- Enhance: 노트 메뉴에 '새 탭에서 열기' 추가
- Fix: (Friendly) 타임라인 헤더와 알림 영역의 헤더 타이틀이 잘못 표시될 수 있음 (kokonect-link/cherrypick#461)
- Fix: (Friendly) 윈도우 크기를 조정하면 타임라인 탭의 하이라이트가 잘못된 위치에 표시될 수 있음 (kokonect-link/cherrypick#415)
- Fix: (Friendly) 일부 페이지에서 알림 영역의 디자인이 잘못 표시될 수 있음
- 사용자 프로필 페이지
- 노트 상세 페이지
- Fix: 노트를 내보낼 때 노트의 편집 기록을 포함
- Fix: MkA 컴포넌트를 사용하는 항목이 작동하지 않을 수 있음 (kokonect-link/cherrypick#422)
- 알림의 읽음 표시, 테스트 알림, 기본 업로드 위치 등
- Fix: 코드 복사 버튼을 누르면 노트 상세 페이지가 표시될 수 있음 (kokonect-link/cherrypick#414)
- Fix: 창으로 제어판을 열었을 때 뒤로 가기 버튼이 잘못된 작동을 야기할 수 있음 (kokonect-link/cherrypick#407)
- Fix: 서버 이름이 매우 긴 경우, CherryPick에 대하여(MkSourceCodeAvailablePopup) 대화 상자의 디자인이 잘못 표시될 수 있음
- Fix: '노트를 클릭하여 자세히 표시' 기능을 활성화하면 일부 기능이 올바르게 작동하지 않을 수 있음 (kokonect-link/cherrypick#451)
- 타임라인에서 노트의 프로필 아이콘을 클릭하면 프로필로 이동하지 않음
- 노트 본문 내의 프로필 아이콘을 클릭하면 화면에 아무것도 표시되지 않음

### Server
- Enhance: 디버깅을 보다 편하게 할 수 있도록 vite 생성 파일의 이름 개선
- Fix: 엔드포인트 `users/translate` 에러 개선
- Fix: Mastodon 사용자에게 대화를 보낼 때 [#objectobject] 태그가 추가될 수 있음

---

## 4.7.0
출시일: 2024/3/19<br>
기반 Misskey 버전: 2024.2.0<br>
Expand Down
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Unless otherwise stated this repository is
Copyright © 2014-2024 syuilo and noridev and other misskey, cherrypick contributors
Copyright © 2014-2024 syuilo & noridev and contributors

And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.

Expand Down
Loading

0 comments on commit b14d587

Please sign in to comment.