From eda9f21943f7157edb8926b29e8bd92a18184768 Mon Sep 17 00:00:00 2001 From: Yuto Terada Date: Sat, 26 Oct 2024 16:09:06 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ci.yaml=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9e1305c..253465e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,8 +40,11 @@ jobs: environment: name: preview url: ${{ steps.deploy.outputs.url }} + defaults: + run: + working-directory: task_yell steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 @@ -49,9 +52,6 @@ jobs: node-version: 18 check-latest: true - - name: Mv directory - run: cd ./task_yell - - name: Install Vercel CLI run: npm install --global vercel@latest @@ -73,8 +73,11 @@ jobs: needs: lint if: ${{ github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest + defaults: + run: + working-directory: task_yell steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup node uses: actions/setup-node@v3 @@ -85,9 +88,6 @@ jobs: - name: Install Vercel CLI run: npm install --global vercel@latest - - name: Mv directory - run: cd ./task_yell - - name: Pull Vercel Environment Information run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} From 44698627e10797903f34f563ffd8baeebfbd66c6 Mon Sep 17 00:00:00 2001 From: Yuto Terada Date: Sat, 26 Oct 2024 16:11:38 +0900 Subject: [PATCH 2/2] format --- task_yell/src/firebase/firestore.ts | 14 +++++++------- task_yell/src/lib/events.ts | 2 +- task_yell/src/lib/types.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/task_yell/src/firebase/firestore.ts b/task_yell/src/firebase/firestore.ts index 66381bd..80727d1 100644 --- a/task_yell/src/firebase/firestore.ts +++ b/task_yell/src/firebase/firestore.ts @@ -8,15 +8,15 @@ import { deleteDoc, doc, //追加 - WithFieldValue, - DocumentData, + type WithFieldValue, + type DocumentData, getDoc, } from "firebase/firestore"; /** dataが WithFieldValue を拡張するように制約を追加 */ export async function createData>( collectionName: string, - data: T + data: T, ): Promise { const docRef = await addDoc(collection(db, collectionName), data); return docRef.id; @@ -24,12 +24,12 @@ export async function createData>( export async function readData(collectionName: string): Promise { const snapshot = await getDocs(collection(db, collectionName)); - return snapshot.docs.map((doc) => ({ id: doc.id, ...doc.data() } as T)); + return snapshot.docs.map((doc) => ({ id: doc.id, ...doc.data() }) as T); } export async function readSingleData( collectionName: string, - id: string + id: string, ): Promise { const docRef = doc(db, collectionName, id); const snapshot = await getDoc(docRef); @@ -39,7 +39,7 @@ export async function readSingleData( export async function updateData( collectionName: string, id: string, - data: Partial + data: Partial, ): Promise { const docRef = doc(db, collectionName, id); await updateDoc(docRef, data); @@ -47,7 +47,7 @@ export async function updateData( export async function deleteData( collectionName: string, - id: string + id: string, ): Promise { const docRef = doc(db, collectionName, id); await deleteDoc(docRef); diff --git a/task_yell/src/lib/events.ts b/task_yell/src/lib/events.ts index c39711e..1c4c862 100644 --- a/task_yell/src/lib/events.ts +++ b/task_yell/src/lib/events.ts @@ -22,7 +22,7 @@ export async function readSingleEvent(id: string): Promise { export async function updateEvent( id: string, - eventData: Partial + eventData: Partial, ): Promise { return updateData(COLLECTION_NAME, id, eventData); } diff --git a/task_yell/src/lib/types.ts b/task_yell/src/lib/types.ts index 25b0f32..35817a5 100644 --- a/task_yell/src/lib/types.ts +++ b/task_yell/src/lib/types.ts @@ -14,4 +14,4 @@ export interface Notification { type: "call" | "push"; eventOrTaskRef: string; userId: string; -} \ No newline at end of file +}