<commit_before>name: Analyze with CodeGuru Reviewer

on: [push, pull_request]

permissions:
    id-token: write
    contents: write
    security-events: write 

jobs:
  build:
    name: Clone your repository
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build gradle package
      run: ./gradlew build -x test

    - name: Configure AWS credentials from Test account
      uses: aws-actions/configure-aws-credentials@master
      with:
        role-to-assume: arn:aws:iam::727015569506:role/GitHubActionRole
        aws-region: us-east-1

    - name: CodeGuru Reviewer
      uses: aws-actions/codeguru-reviewer@v1.1
      continue-on-error: false
      with:          
        s3_bucket: codeguru-reviewer-build-artifacts-727015569506-us-east-1
        build_path: ./build/libs

    - name: Upload review result
      if: ${{ github.event_name != 'push' }}
      uses: github/codeql-action/upload-sarif@v1
      with:
        sarif_file: codeguru-results.sarif.json<commit_msg>try without deep clone<commit_after>name: Analyze with CodeGuru Reviewer

on: [push, pull_request, workflow_dispatch]

permissions:
    id-token: write
    contents: read
    security-events: write 

jobs:
  build:
    name: Clone your repository
    runs-on: ubuntu-latest
    steps:
    - name: Configure AWS credentials from Test account
      uses: aws-actions/configure-aws-credentials@master
      id: iam-role
      with:
        role-to-assume: arn:aws:iam::727015569506:role/GitHubActionRole
        aws-region: us-east-1    

    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build gradle package
      run: ./gradlew build -x test

    - name: CodeGuru Reviewer
      uses: aws-actions/codeguru-reviewer@v1.1
      if: steps.iam-role.outcome == 'success'
      continue-on-error: false
      with:          
        s3_bucket: codeguru-reviewer-build-artifacts-727015569506-us-east-1
        build_path: ./build/libs
        
    - name: Store SARIF file
      if: steps.iam-role.outcome == 'success'
      uses: actions/upload-artifact@v2
      with:
        name: SARIF_recommendations
        path: ./codeguru-results.sarif.json
{'fraction_non_alphanumeric': 0.09907640638119228, 'fraction_numerical': 0.030646515533165407, 'mean_word_length': 2.323570432357043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4416298', 'n_tokens_mistral': 852, 'n_tokens_neox': 790, 'n_words': 179}