From d1ac01ac54acd6bc3309e4226cd7e6401417e62e Mon Sep 17 00:00:00 2001 From: Rajasimman S Date: Thu, 16 Apr 2026 01:03:45 +0530 Subject: [PATCH] feat: implement pull request checks workflow and remove old time-to-review workflow --- ...{validate-commits.yml => pull-request.yml} | 26 +++++++++++++++---- .github/workflows/time-to-review.yml | 24 ----------------- 2 files changed, 21 insertions(+), 29 deletions(-) rename .github/workflows/{validate-commits.yml => pull-request.yml} (52%) delete mode 100644 .github/workflows/time-to-review.yml diff --git a/.github/workflows/validate-commits.yml b/.github/workflows/pull-request.yml similarity index 52% rename from .github/workflows/validate-commits.yml rename to .github/workflows/pull-request.yml index 964c207..ad93eff 100644 --- a/.github/workflows/validate-commits.yml +++ b/.github/workflows/pull-request.yml @@ -1,4 +1,4 @@ -name: Validate Commit Messages +name: Pull Request Checks on: pull_request: @@ -7,24 +7,40 @@ on: permissions: contents: read pull-requests: write + issues: write jobs: validate-commits: runs-on: ubuntu-latest + name: Validate Commit Messages steps: - name: Checkout code uses: actions/checkout@v3 with: fetch-depth: 0 - + - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '20' - + - name: Validate Commit Messages - uses: ./ # Assumes action is in the root directory + uses: ./ with: github-token: ${{ secrets.GITHUB_TOKEN }} # Optional: customize regex pattern - # pattern: '^(feat|fix|docs)(\(\w+\))?: .+$' \ No newline at end of file + # pattern: '^(feat|fix|docs)(\(\w+\))?: .+$' + + time-to-review: + runs-on: ubuntu-latest + name: Calculate Review Time + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Calculate review time + uses: srajasimman/time-to-review@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/time-to-review.yml b/.github/workflows/time-to-review.yml deleted file mode 100644 index 9ec118c..0000000 --- a/.github/workflows/time-to-review.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Time to Review - -on: - pull_request: - types: [opened, synchronize] - -permissions: - pull-requests: read - issues: write - -jobs: - time-to-review: - runs-on: ubuntu-latest - name: Calculate review time - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Calculate review time - uses: srajasimman/time-to-review@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }}