From 0faa4470fb41ea2f7ea2770b905bf7e17b7893cc Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Sep 2021 19:28:02 +0900 Subject: [PATCH 1/4] =?UTF-8?q?GitHub=20Actions=E3=81=A7Docker=20Hub?= =?UTF-8?q?=E3=81=B8=E3=81=AEpush=E3=82=92=E8=A1=8C=E3=81=86=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=20(#7782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create docker.yml * Update .github/workflows/docker.yml Co-authored-by: tamaina * add workflow_dispatch * Multi-platform image * Revert "Multi-platform image" This reverts commit e5bac6632909a5020b0708227ebe248b443c2c2b. Co-authored-by: tamaina --- .github/workflows/docker.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..1c6ad343e3 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,32 @@ +name: Publish Docker image + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: misskey/misskey + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push to Docker Hub + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 935d6473edf259efa3b9c2c167a80cb960b07ad6 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Sep 2021 20:23:31 +0900 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20API=E3=83=89=E3=82=AD=E3=83=A5?= =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AE=E4=BF=AE=E6=AD=A3=20(#7771?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation --- locales/ja-JP.yml | 4 +++ src/misc/api-permissions.ts | 1 + src/models/repositories/notification.ts | 46 +++++++++++++++++++++---- 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index e22f50668f..b9623ef0d0 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1150,6 +1150,10 @@ _permissions: "write:user-groups": "ユーザーグループを操作する" "read:channels": "チャンネルを見る" "write:channels": "チャンネルを操作する" + "read:gallery": "ギャラリーを見る" + "write:gallery": "ギャラリーを操作する" + "read:gallery-likes": "ギャラリーのいいねを見る" + "write:gallery-likes": "ギャラリーのいいねを操作する" _auth: shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?" diff --git a/src/misc/api-permissions.ts b/src/misc/api-permissions.ts index eb20c3d289..160cdf9fd6 100644 --- a/src/misc/api-permissions.ts +++ b/src/misc/api-permissions.ts @@ -32,3 +32,4 @@ export const kinds = [ 'read:gallery-likes', 'write:gallery-likes', ]; +// IF YOU ADD KINDS(PERMISSIONS), YOU MUST ADD TRANSLATIONS (under _permissions). diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index 55af96b6d7..ed9de7ef4c 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -7,6 +7,7 @@ import { Note } from '@/models/entities/note'; import { NoteReaction } from '@/models/entities/note-reaction'; import { User } from '@/models/entities/user'; import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis'; +import { notificationTypes } from '@/types'; export type PackedNotification = SchemaType; @@ -124,20 +125,53 @@ export const packedNotificationSchema = { optional: false as const, nullable: false as const, format: 'date-time', }, + isRead: { + type: 'boolean' as const, + optional: false as const, nullable: false as const, + }, type: { type: 'string' as const, optional: false as const, nullable: false as const, - enum: ['follow', 'followRequestAccepted', 'receiveFollowRequest', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote'], - }, - userId: { - type: 'string' as const, - optional: true as const, nullable: true as const, - format: 'id', + enum: [...notificationTypes], }, user: { type: 'object' as const, ref: 'User', optional: true as const, nullable: true as const, }, + userId: { + type: 'string' as const, + optional: true as const, nullable: true as const, + format: 'id', + }, + note: { + type: 'object' as const, + ref: 'Note', + optional: true as const, nullable: true as const, + }, + reaction: { + type: 'string' as const, + optional: true as const, nullable: true as const, + }, + choice: { + type: 'number' as const, + optional: true as const, nullable: true as const, + }, + invitation: { + type: 'object' as const, + optional: true as const, nullable: true as const, + }, + body: { + type: 'string' as const, + optional: true as const, nullable: true as const, + }, + header: { + type: 'string' as const, + optional: true as const, nullable: true as const, + }, + icon: { + type: 'string' as const, + optional: true as const, nullable: true as const, + }, } }; From c63ba5470a1d04a86908d504c7044bd4987c20fc Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 11 Sep 2021 11:32:47 +0900 Subject: [PATCH 3/4] fix: use master branch when build docker image --- .github/workflows/docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1c6ad343e3..fe6c3bfd20 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,6 +13,8 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v2 + with: + ref: master - name: Docker meta id: meta uses: docker/metadata-action@v3 From f59f424795490e6ae2fe0be65ee3debb0776e939 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 11 Sep 2021 11:37:35 +0900 Subject: [PATCH 4/4] Revert "fix: use master branch when build docker image" This reverts commit c63ba5470a1d04a86908d504c7044bd4987c20fc. --- .github/workflows/docker.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fe6c3bfd20..1c6ad343e3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,8 +13,6 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v2 - with: - ref: master - name: Docker meta id: meta uses: docker/metadata-action@v3