From b9b45e81f333ed989bdbf79755bd5fcba1cc2b80 Mon Sep 17 00:00:00 2001 From: Bama Charan Chhandogi Date: Mon, 5 Aug 2024 12:45:51 +0530 Subject: [PATCH] update github workflow --- .github/workflows/git-analyzer.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/git-analyzer.yml b/.github/workflows/git-analyzer.yml index 7d17ff7..4e22497 100644 --- a/.github/workflows/git-analyzer.yml +++ b/.github/workflows/git-analyzer.yml @@ -1,18 +1,19 @@ -name: Analyze +name: Git History Analysis on: push: - branches: - - main + branches: [ master ] + pull_request: + branches: [ master ] jobs: analyze: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Run Git History Analyzer - uses: BamaCharanChhandogi/git-analyzer@v1.0.1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # This ensures all history is fetched + - name: Run Git History Analyzer + uses: BamaCharanChhandogi/git-analyzer@v1.0.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }}