You can use this GitHub Action to create pull requests tests and code analysis info to your repository
All inputs are required add_tests, refresh_tests, tests_scope, scope_path
| Name | Type | Description | Required | 
|---|---|---|---|
| add_tests | 'true' / 'false' | Add tests to pull request | Yes | 
| refresh_tests | 'true' / 'false' | Delete old tests in pull request | Yes | 
| utbot_version | xxxx.xx[.xx] | UTBot version to run | Yes | 
| runtests | 'true' / 'false' | Run generated tests | Yes | 
| scope | project/directory/file | Testing scope | Yes | 
| path | Realtive path string | directoryorfilepath | Nofor theproject,Yesfor the rest | 
- Settings > Actions > Allow GitHub Actions to create and approve pull requests
- permissions: write-allline at action before using Utbot Action
- create the file .github/workflows/run-utbot.ymlwith context from the section below
name: "Run UTBotCpp-action"
on:
  workflow_dispatch:
    
jobs:
  build:
    runs-on: ubuntu-latest
    permissions: write-all
    steps:
    - name: UTBot code analysis
      uses: UnitTestBot/UTBotCpp-action@test-1.0.27
      with:
        add_tests: 'true'
        refresh_tests: 'true'
        utbot_version: '2022.10.4'
        runtests: 'true'
        scope: 'project'
# for individual file:
#       scope: 'file'
#       path: 'src/main.c'