From e3acf68416bb47f1e65746524c758e010f159bd1 Mon Sep 17 00:00:00 2001 From: miensoap Date: Mon, 18 Nov 2024 14:27:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20AdminGuard=20=EB=B2=94=EC=9C=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/admin/admin.module.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/backend/src/admin/admin.module.ts b/backend/src/admin/admin.module.ts index 4af9bcb4..19205da6 100644 --- a/backend/src/admin/admin.module.ts +++ b/backend/src/admin/admin.module.ts @@ -1,9 +1,10 @@ -import { Module } from '@nestjs/common'; +import { Module, UseGuards } from '@nestjs/common'; import { AdminBannerModule } from './banner/banner.module'; -import { RouterModule, APP_GUARD } from '@nestjs/core'; +import { RouterModule } from '@nestjs/core'; import { AdminGuard } from '@src/admin/guard/AdminGuard'; import { AuthModule } from '@src/auth/auth.module'; +@UseGuards(AdminGuard) @Module({ imports: [ AuthModule, @@ -21,11 +22,5 @@ import { AuthModule } from '@src/auth/auth.module'; }, ]), ], - providers: [ - { - provide: APP_GUARD, - useClass: AdminGuard, - }, - ], }) export class AdminModule {} From edb2f6289a734ae6653dde2751e936deb9f7f84d Mon Sep 17 00:00:00 2001 From: miensoap Date: Mon, 18 Nov 2024 14:44:12 +0900 Subject: [PATCH 2/2] =?UTF-8?q?conf:=20=ED=95=AB=ED=94=BD=EC=8A=A4=20?= =?UTF-8?q?=EB=A8=B8=EC=A7=80=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/hotfix.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/hotfix.yml diff --git a/.github/workflows/hotfix.yml b/.github/workflows/hotfix.yml new file mode 100644 index 00000000..c1d30414 --- /dev/null +++ b/.github/workflows/hotfix.yml @@ -0,0 +1,23 @@ +name: Bypass Branch Protection for Hotfix PRs + +on: + pull_request: + branches: + - develop + +jobs: + bypass-protection: + if: startsWith(github.event.pull_request.head.ref, 'hotfix/') + runs-on: ubuntu-latest + permissions: + pull-requests: write + contents: write + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Attempt Rebase and Merge Hotfix PR + run: | + gh pr merge ${{ github.event.pull_request.number }} --rebase --admin + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}